avconv: Make sure the encoder exists before inspecting supported_list

This fixes crashes when there is no encoder for the default codec of
selected format.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö 2013-03-06 15:01:36 +02:00
parent 5da5128493
commit e760e1d408
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ static char *choose_ ## var ## s(OutputStream *ost) \
if (ost->st->codec->var != none) { \
get_name(ost->st->codec->var); \
return av_strdup(name); \
} else if (ost->enc->supported_list) { \
} else if (ost->enc && ost->enc->supported_list) { \
const type *p; \
AVIOContext *s = NULL; \
uint8_t *ret; \