vlc | branch: master | Thomas Guillem <tho...@gllm.fr> | Tue Aug 18 10:51:52 2015 +0200| [99e85d080039dd68df87ad1a4e230eb54048f04a] | committer: Thomas Guillem
demux: mp4: add missing vlc_input_attachment_New() error handling > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=99e85d080039dd68df87ad1a4e230eb54048f04a --- modules/demux/mp4/mp4.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index da2c157..5a626c2 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -1586,8 +1586,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) char rgsz_location[12]; snprintf( rgsz_location, 12, "%4.4s[%"PRIu16"]", (char*)&rgi_pict_atoms[i], (uint16_t) i_box_count - 1 ); - (*ppp_attach)[i_count++] = vlc_input_attachment_New( rgsz_location, "image/x-pict", + (*ppp_attach)[i_count] = vlc_input_attachment_New( rgsz_location, "image/x-pict", "Quickdraw image", p_pict->data.p_binary->p_blob, p_pict->data.p_binary->i_blob ); + if ( !(*ppp_attach)[i_count] ) + { + i_count = 0; + break; + } + i_count++; msg_Dbg( p_demux, "adding attachment %s", rgsz_location ); } } _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits