Commit e760e1d4 authored by Martin Storsjö's avatar Martin Storsjö

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: default avatarMartin Storsjö <martin@martin.st>
parent 5da51284
......@@ -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; \
......
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