Skip to content

Commit

Permalink
ffmpeg: fix a crash with complex filters when pix_fmt is not specified
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
mbouron authored and michaelni committed May 20, 2012
1 parent 318e395 commit 432fe9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 432fe9a

Please sign in to comment.