[FFmpeg-cvslog] avconv: Make sure the encoder exists before inspecting supported_list
Martin Storsjö
git at videolan.org
Thu Mar 7 00:33:17 CET 2013
ffmpeg | branch: master | Martin Storsjö <martin at martin.st> | Wed Mar 6 15:01:36 2013 +0200| [e760e1d408261566814e24c43119d7aca538d2eb] | committer: 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: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e760e1d408261566814e24c43119d7aca538d2eb
---
avconv_filter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/avconv_filter.c b/avconv_filter.c
index cad68e2..2065cb0 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; \
More information about the ffmpeg-cvslog
mailing list