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>
pull/19/head
Martin Storsjö 12 years ago
parent 5da5128493
commit e760e1d408
  1. 2
      avconv_filter.c

@ -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; \

Loading…
Cancel
Save