[vlc-commits] avformat: add missing vlc_input_attachment_New() error handling

Thomas Guillem git at videolan.org
Tue Aug 18 10:55:28 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Aug 18 10:52:01 2015 +0200| [e09289ed80488589a3b7e561b7955a23e5c715f4] | committer: Thomas Guillem

avformat: add missing vlc_input_attachment_New() error handling

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e09289ed80488589a3b7e561b7955a23e5c715f4
---

 modules/demux/avformat/demux.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index b680a99..625375e 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -462,8 +462,9 @@ int OpenDemux( vlc_object_t *p_this )
                         p_attachment = vlc_input_attachment_New(
                                 filename->value, "application/x-truetype-font",
                                 NULL, cc->extradata, (int)cc->extradata_size );
-                        TAB_APPEND( p_sys->i_attachments, p_sys->attachments,
-                                p_attachment );
+                        if( p_attachment )
+                            TAB_APPEND( p_sys->i_attachments, p_sys->attachments,
+                                        p_attachment );
                     }
                 }
                 else msg_Warn( p_demux, "unsupported attachment type (%u) in avformat demux", cc->codec_id );



More information about the vlc-commits mailing list