[FFmpeg-cvslog] avconv: pass the hwaccel frames context to the decoder

Anton Khirnov git at videolan.org
Sun Nov 13 18:25:49 EET 2016


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri May 27 12:54:48 2016 +0200| [232399e3ee219d16d0e0d482c9f31a26202d4993] | committer: Anton Khirnov

avconv: pass the hwaccel frames context to the decoder

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=232399e3ee219d16d0e0d482c9f31a26202d4993
---

 avconv.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/avconv.c b/avconv.c
index 65eabbd..4eae015 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1616,6 +1616,13 @@ static enum AVPixelFormat get_format(AVCodecContext *s, const enum AVPixelFormat
             }
             continue;
         }
+
+        if (ist->hw_frames_ctx) {
+            s->hw_frames_ctx = av_buffer_ref(ist->hw_frames_ctx);
+            if (!s->hw_frames_ctx)
+                return AV_PIX_FMT_NONE;
+        }
+
         ist->active_hwaccel_id = hwaccel->id;
         ist->hwaccel_pix_fmt   = *p;
         break;



More information about the ffmpeg-cvslog mailing list