[FFmpeg-cvslog] Fix crash in ffmpeg.c with PIX_FMT_NONE

Michael Niedermayer git at videolan.org
Wed Apr 6 01:16:45 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Apr  5 23:22:08 2011 +0200| [b5ef6f8eb452c37b19d973d61548725d7b91113e] | committer: Michael Niedermayer

Fix crash in ffmpeg.c with PIX_FMT_NONE
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 ffmpeg.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index cb23581..e2692de 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -657,6 +657,7 @@ static void choose_pixel_fmt(AVStream *st, AVCodec *codec)
                 break;
         }
         if (*p == -1) {
+            if(st->codec->pix_fmt != PIX_FMT_NONE)
             av_log(NULL, AV_LOG_WARNING,
                    "Incompatible pixel format '%s' for codec '%s', auto-selecting format '%s'\n",
                    av_pix_fmt_descriptors[st->codec->pix_fmt].name,



More information about the ffmpeg-cvslog mailing list