[FFmpeg-cvslog] avcodec/options: Set AVCodecContext->codec upon initialization.

Vadim Kalinsky git at videolan.org
Tue Nov 18 18:47:36 CET 2014


ffmpeg | branch: master | Vadim Kalinsky <vkalinsky at Q.local> | Wed Nov 12 12:25:45 2014 -0500| [d1d390427342308ffe70e8c4a8a742e4dd63fba1] | committer: Michael Niedermayer

avcodec/options: Set AVCodecContext->codec upon initialization.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/options.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 5437770..9713e8d 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -95,8 +95,10 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec)
     s->av_class = &av_codec_context_class;
 
     s->codec_type = codec ? codec->type : AVMEDIA_TYPE_UNKNOWN;
-    if (codec)
+    if (codec) {
+        s->codec = codec;
         s->codec_id = codec->id;
+    }
 
     if(s->codec_type == AVMEDIA_TYPE_AUDIO)
         flags= AV_OPT_FLAG_AUDIO_PARAM;



More information about the ffmpeg-cvslog mailing list