[vlc-commits] demux: mp4: reset es format on cat change
Francois Cartegnie
git at videolan.org
Wed Jul 5 11:38:18 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jul 5 11:25:29 2017 +0200| [b50c2c70750d628391ecad79e3e2de23f559bb83] | committer: Francois Cartegnie
demux: mp4: reset es format on cat change
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b50c2c70750d628391ecad79e3e2de23f559bb83
---
modules/demux/mp4/mp4.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index fa2564e25c..bf512832cc 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -3260,7 +3260,8 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
{
return;
}
- p_track->fmt.i_cat = AUDIO_ES;
+ es_format_Clean( &p_track->fmt );
+ es_format_Init( &p_track->fmt, AUDIO_ES, 0 );
break;
case( ATOM_vide ):
@@ -3268,7 +3269,8 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
{
return;
}
- p_track->fmt.i_cat = VIDEO_ES;
+ es_format_Clean( &p_track->fmt );
+ es_format_Init( &p_track->fmt, VIDEO_ES, 0 );
break;
case( ATOM_hint ):
@@ -3291,12 +3293,14 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
if( !strcmp(sdp_media_type, "m=audio") )
{
msg_Dbg( p_demux, "Found audio Rtp: %s", sdp_media_type );
- p_track->fmt.i_cat = AUDIO_ES;
+ es_format_Clean( &p_track->fmt );
+ es_format_Init( &p_track->fmt, AUDIO_ES, 0 );
}
else if( !strcmp(sdp_media_type, "m=video") )
{
msg_Dbg( p_demux, "Found video Rtp: %s", sdp_media_type );
- p_track->fmt.i_cat = VIDEO_ES;
+ es_format_Clean( &p_track->fmt );
+ es_format_Init( &p_track->fmt, VIDEO_ES, 0 );
}
else
{
@@ -3312,7 +3316,8 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
case( ATOM_subt ): /* ttml */
case( ATOM_sbtl ):
case( ATOM_clcp ): /* closed captions */
- p_track->fmt.i_cat = SPU_ES;
+ es_format_Clean( &p_track->fmt );
+ es_format_Init( &p_track->fmt, SPU_ES, 0 );
break;
default:
@@ -3516,7 +3521,7 @@ static void MP4_TrackClean( es_out_t *out, mp4_track_t *p_track )
static void MP4_TrackInit( mp4_track_t *p_track )
{
memset( p_track, 0, sizeof(mp4_track_t) );
- es_format_Init( &p_track->fmt, 0, 0 );
+ es_format_Init( &p_track->fmt, UNKNOWN_ES, 0 );
p_track->i_timescale = 1;
}
More information about the vlc-commits
mailing list