[FFmpeg-cvslog] lavc: initialize AVCodecContext.sw_pix_fmt properly

Anton Khirnov git at videolan.org
Sun Mar 12 14:23:47 EET 2017


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Thu Jul 14 12:16:17 2016 +0200| [d59641abfd25a1007bdf4723d952887b1e3619c6] | committer: Anton Khirnov

lavc: initialize AVCodecContext.sw_pix_fmt properly

Currently it's memset to 0, which is YUV420P. It should be initialized
to none.

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

 libavcodec/options.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/options.c b/libavcodec/options.c
index 18613ac..00921fb 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -98,6 +98,7 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec)
     s->execute2            = avcodec_default_execute2;
     s->sample_aspect_ratio = (AVRational){0,1};
     s->pix_fmt             = AV_PIX_FMT_NONE;
+    s->sw_pix_fmt          = AV_PIX_FMT_NONE;
     s->sample_fmt          = AV_SAMPLE_FMT_NONE;
 
     s->reordered_opaque    = AV_NOPTS_VALUE;



More information about the ffmpeg-cvslog mailing list