[FFmpeg-cvslog] ffmpeg: fix a crash with complex filters when pix_fmt is not specified

Matthieu Bouron git at videolan.org
Sun May 20 19:36:56 CEST 2012


ffmpeg | branch: master | Matthieu Bouron <matthieu.bouron at gmail.com> | Fri May  4 15:40:34 2012 +0200| [432fe9a38afca9104c1c11942d21739e2a48ba96] | committer: Michael Niedermayer

ffmpeg: fix a crash with complex filters when pix_fmt is not specified

ffmpeg -i in.mxf -filter_complex "[0:0]fieldorder=tff" out.wav will
fail with an error message instead of crashing.

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

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

 ffmpeg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 7690e43..8f3ffb5 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -713,7 +713,7 @@ static char *choose_pix_fmts(OutputStream *ost)
     }
     if (ost->st->codec->pix_fmt != PIX_FMT_NONE) {
         return av_strdup(av_get_pix_fmt_name(choose_pixel_fmt(ost->st, ost->enc, ost->st->codec->pix_fmt)));
-    } else if (ost->enc->pix_fmts) {
+    } else if (ost->enc && ost->enc->pix_fmts) {
         const enum PixelFormat *p;
         AVIOContext *s = NULL;
         uint8_t *ret;



More information about the ffmpeg-cvslog mailing list