[MPlayer-dev-eng] [PATCH] Add DVB teletext support

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Aug 31 00:38:08 CEST 2009


On Sun, Aug 30, 2009 at 09:29:50PM +0000, Carl Eugen Hoyos wrote:
> Carl Eugen Hoyos <cehoyos <at> ag.or.at> writes:
> 
> > Index: libmpdemux/mp_taglists.c
> > ===================================================================
> > --- libmpdemux/mp_taglists.c    (revision 29588)
> > +++ libmpdemux/mp_taglists.c    (working copy)
> > @@ -66,6 +66,7 @@
> >      { CODEC_ID_PCM_BLURAY,        MKTAG('B', 'P', 'C', 'M')},
> >      { CODEC_ID_MP2,               0x50},
> >      { CODEC_ID_AC3,               0x2000},
> > +    { CODEC_ID_MPEG2VIDEO,        MKTAG('M', 'P', 'G', '2')},
> >      { 0, 0 },
> >  };
> 
> And of course:
> 
> Index: libmpdemux/demux_lavf.c
> ===================================================================
> --- libmpdemux/demux_lavf.c     (revision 29569)
> +++ libmpdemux/demux_lavf.c     (working copy)
> @@ -221,11 +221,10 @@
>      AVStream *st= avfc->streams[i];
>      AVCodecContext *codec= st->codec;
>      AVMetadataTag *lang = av_metadata_get(st->metadata, "language", NULL, 0);
> -    int g;
> +    int g, override_tag;
> 
>      switch(codec->codec_type){
>          case CODEC_TYPE_AUDIO:{
> -            int override_tag;
>              WAVEFORMATEX *wf;
>              sh_audio_t* sh_audio;
>              sh_audio=new_sh_audio(demuxer, i);
> @@ -322,6 +321,9 @@
>                          codec->codec_tag= MKTAG(24, 'B', 'G', 'R');
>                  }
>              }
> +            override_tag= av_codec_get_tag(mp_wav_override_taglists,
> codec->codec_id);
> +            if (override_tag)
> +                codec->codec_tag= override_tag;

I'd say move it out of the switch so it isn't duplicated.
Also obviously mp_wav_override_taglists should then be renamed...



More information about the MPlayer-dev-eng mailing list