summaryrefslogtreecommitdiff
path: root/avconv_filter.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-03-06 15:01:36 +0200
committerMartin Storsjö <martin@martin.st>2013-03-06 21:56:10 +0200
commite760e1d408261566814e24c43119d7aca538d2eb (patch)
treef68a8d9c0f46c380b4037f629f8515e8be7e9266 /avconv_filter.c
parent5da51284937649a8ebb84fa951c235438fcbf8ae (diff)
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>
Diffstat (limited to 'avconv_filter.c')
-rw-r--r--avconv_filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/avconv_filter.c b/avconv_filter.c
index cad68e2da3..2065cb008b 100644
--- a/avconv_filter.c
+++ b/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; \