Commit 432fe9a3 authored by Matthieu Bouron's avatar Matthieu Bouron Committed by 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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 318e3957
...@@ -713,7 +713,7 @@ static char *choose_pix_fmts(OutputStream *ost) ...@@ -713,7 +713,7 @@ static char *choose_pix_fmts(OutputStream *ost)
} }
if (ost->st->codec->pix_fmt != PIX_FMT_NONE) { 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))); 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; const enum PixelFormat *p;
AVIOContext *s = NULL; AVIOContext *s = NULL;
uint8_t *ret; uint8_t *ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment