[vlc-devel] [PATCH 08/18] demux: mp4: use es_format_Change() where possible

Steve Lhomme robux4 at gmail.com
Wed Jul 5 17:06:10 CEST 2017


Ignore this one, Francois pushed the same thing.

On Wed, Jul 5, 2017 at 5:00 PM, Steve Lhomme <robux4 at videolabs.io> wrote:
> ---
>  modules/demux/mp4/mp4.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
> index bf512832cc..cad62a0762 100644
> --- a/modules/demux/mp4/mp4.c
> +++ b/modules/demux/mp4/mp4.c
> @@ -3260,8 +3260,7 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
>              {
>                  return;
>              }
> -            es_format_Clean( &p_track->fmt );
> -            es_format_Init( &p_track->fmt, AUDIO_ES, 0 );
> +            es_format_Change( &p_track->fmt, AUDIO_ES, 0 );
>              break;
>
>          case( ATOM_vide ):
> @@ -3269,8 +3268,7 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
>              {
>                  return;
>              }
> -            es_format_Clean( &p_track->fmt );
> -            es_format_Init( &p_track->fmt, VIDEO_ES, 0 );
> +            es_format_Change( &p_track->fmt, VIDEO_ES, 0 );
>              break;
>
>          case( ATOM_hint ):
> @@ -3293,14 +3291,12 @@ 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 );
> -                es_format_Clean( &p_track->fmt );
> -                es_format_Init( &p_track->fmt, AUDIO_ES, 0 );
> +                es_format_Change( &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 );
> -                es_format_Clean( &p_track->fmt );
> -                es_format_Init( &p_track->fmt, VIDEO_ES, 0 );
> +                es_format_Change( &p_track->fmt, VIDEO_ES, 0 );
>              }
>              else
>              {
> @@ -3316,8 +3312,7 @@ 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 */
> -            es_format_Clean( &p_track->fmt );
> -            es_format_Init( &p_track->fmt, SPU_ES, 0 );
> +            es_format_Change( &p_track->fmt, SPU_ES, 0 );
>              break;
>
>          default:
> --
> 2.12.1
>


More information about the vlc-devel mailing list