summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2012-05-04 15:40:34 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-20 19:36:00 +0200
commit432fe9a38afca9104c1c11942d21739e2a48ba96 (patch)
tree8d04cd59af4003c58c55b183712115885d5b9b96 /ffmpeg.c
parent318e39576444da0efadabc2db8d3898453d2f5bc (diff)
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@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 7690e43cf7..8f3ffb5de6 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;