diff options
Diffstat (limited to 'media-video/hwdecode-demos/files/ffmpeg.patch')
-rw-r--r-- | media-video/hwdecode-demos/files/ffmpeg.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/media-video/hwdecode-demos/files/ffmpeg.patch b/media-video/hwdecode-demos/files/ffmpeg.patch new file mode 100644 index 000000000000..fa8bdaf2cd4d --- /dev/null +++ b/media-video/hwdecode-demos/files/ffmpeg.patch @@ -0,0 +1,33 @@ +Index: hwdecode-demos-0.9.5/src/ffmpeg.c +=================================================================== +--- hwdecode-demos-0.9.5.orig/src/ffmpeg.c ++++ hwdecode-demos-0.9.5/src/ffmpeg.c +@@ -193,10 +193,14 @@ int ffmpeg_decode(AVCodecContext *avctx, + { + CommonContext * const common = common_get_context(); + FFmpegContext * const ffmpeg = ffmpeg_get_context(); ++ AVPacket pkt; + int got_picture; + + got_picture = 0; +- if (avcodec_decode_video(avctx, ffmpeg->frame, &got_picture, (uint8_t *)buf, buf_size) < 0) ++ av_init_packet( &pkt ); ++ pkt.data = buf; ++ pkt.size = buf_size; ++ if (avcodec_decode_video2(avctx, ffmpeg->frame, &got_picture, &pkt) < 0) + return -1; + + if (got_picture && hwaccel_type() == HWACCEL_NONE) { +Index: hwdecode-demos-0.9.5/src/ffmpeg_video.c +=================================================================== +--- hwdecode-demos-0.9.5.orig/src/ffmpeg_video.c ++++ hwdecode-demos-0.9.5/src/ffmpeg_video.c +@@ -96,7 +96,7 @@ int decode(void) + + video_stream = NULL; + for (i = 0; i < ic->nb_streams; i++) { +- if (ic->streams[i]->codec->codec_type == CODEC_TYPE_VIDEO && !video_stream) ++ if (ic->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO && !video_stream) + video_stream = ic->streams[i]; + else + ic->streams[i]->discard = AVDISCARD_ALL; |