[vlc-devel] [PATCH] demux: mp4: unbreak vobsub playback and read vobsub palette
John Stebbins
stebbins at jetheaddev.com
Wed Apr 9 20:45:38 CEST 2014
---
modules/demux/mp4/mp4.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index ec43931..0adb8d9 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -758,7 +758,8 @@ static int Demux( demux_t *p_demux )
}
else if( tk->fmt.i_cat == SPU_ES )
{
- if ( tk->fmt.i_codec != VLC_CODEC_TX3G )
+ if ( tk->fmt.i_codec != VLC_CODEC_TX3G &&
+ tk->fmt.i_codec != VLC_CODEC_SPU )
p_block->i_buffer = 0;
}
@@ -2315,6 +2316,16 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
memcpy( p_track->fmt.p_extra, p_decconfig->p_decoder_specific_info,
p_track->fmt.i_extra );
}
+ if( p_track->fmt.i_codec == VLC_CODEC_SPU &&
+ p_track->fmt.i_extra >= 16 * 4 )
+ {
+ for( int i = 0; i < 16; i++ )
+ {
+ p_track->fmt.subs.spu.palette[1 + i] =
+ GetDWBE((char*)p_track->fmt.p_extra + i * 4);
+ }
+ p_track->fmt.subs.spu.palette[0] = 0xBeef;
+ }
}
else
{
--
1.9.0
More information about the vlc-devel
mailing list