Module: libav
Branch: master
Commit: e760e1d408261566814e24c43119d7aca538d2eb

Author:    Martin Storsjö <[email protected]>
Committer: Martin Storsjö <[email protected]>
Date:      Wed Mar  6 15:01:36 2013 +0200

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ö <[email protected]>

---

 avconv_filter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to