[vlc-devel] [PATCH 10/10] demux:mp4: make sure we don't touch spu data on non SPU tracks

Steve Lhomme robux4 at gmail.com
Fri Jul 7 14:17:54 CEST 2017


On Fri, Jul 7, 2017 at 1:48 PM, Francois Cartegnie <fcvlcdev at free.fr> wrote:
> Le 07/07/2017 à 12:56, Steve Lhomme a écrit :
>
>> +++ b/modules/demux/mp4/essetup.c
>> @@ -1249,6 +1249,7 @@ int SetupSpuES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
>>                      p_style->i_features |= (STYLE_HAS_BACKGROUND_ALPHA | STYLE_HAS_BACKGROUND_COLOR);
>>                  }
>>              }
>> +            assert(p_track->fmt.i_cat == SPU_ES);
>>              p_track->fmt.subs.p_style = p_style;
>
> assert is not release proof.

No but that's a good way to find out issues that are harder to detect
later. Once you reach this point with the wrong kind of track,
anything can happen, you can't expect to recover from that.

> Francois
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list