[FFmpeg-cvslog] r11627 - trunk/libavformat/mov.c

Michael Niedermayer michaelni
Sun Jan 27 18:43:15 CET 2008


On Sun, Jan 27, 2008 at 03:35:42PM +0100, Baptiste Coudurier wrote:
> Hi,
> 
> michael wrote:
> > Author: michael
> > Date: Sat Jan 26 23:57:53 2008
> > New Revision: 11627
> > 
> > Log:
> > Set subtitle codec id correctly, i hope this doesnt break anything.
> > 
> > 
> > Modified:
> >    trunk/libavformat/mov.c
> > 
> > Modified: trunk/libavformat/mov.c
> > ==============================================================================
> > --- trunk/libavformat/mov.c	(original)
> > +++ trunk/libavformat/mov.c	Sat Jan 26 23:57:53 2008
> > @@ -233,7 +233,6 @@ static int mov_read_hdlr(MOVContext *c, 
> >          st->codec->codec_id = CODEC_ID_MP2;
> >      else if(type == MKTAG('s', 'u', 'b', 'p')) {
> >          st->codec->codec_type = CODEC_TYPE_SUBTITLE;
> > -        st->codec->codec_id = CODEC_ID_DVD_SUBTITLE;
> >      }
> >      get_be32(pb); /* component  manufacture */
> >      get_be32(pb); /* component flags */
> > @@ -788,6 +787,8 @@ static int mov_read_stsd(MOVContext *c, 
> >                  st->codec->bits_per_sample = bits_per_sample;
> >                  sc->sample_size = (bits_per_sample >> 3) * st->codec->channels;
> >              }
> > +        } else if(st->codec->codec_type==CODEC_TYPE_SUBTITLE){
> > +            st->codec->codec_id= id;
> >          } else {
> >              /* other codec type, just skip (rtp, mp4s, tmcd ...) */
> >              url_fskip(pb, size - (url_ftell(pb) - start_pos));
> 
> This 'subp' media handler is the hackish way for nero to wrap dvd
> subtitle, I don't think poluting objectype id is a good solution since I
> removed the same standard one day ago.
> 
> Does the play way with the old way to set codec id ? If so, I'd prefer
> to revert the commit.

the old way did not work, thats why i changed it
besides the object id is the codec identifer, the media type is the
type identifer (video/audio/text/subtitle) hence its name "media type"
also "subp" can hardly be explained as an abbreviation of vobsub or dvdsub
its much closer to subtitle picture or subtitle page which would be
generic media types independant of the used codec

and yes i fully agree with you that poluting object type id with it is
bad, they should have registered an official one instead of using a private
one, still if another files uses 224 as well the solution would be a
if(codec_type == CODEC_TYPE_SUBTITLE) in the esds parsing code not hardcoding
that all nero subtitles are vobsubs and then skiping he parsing of the actual
codec identifer

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080127/961adfad/attachment.pgp>



More information about the ffmpeg-cvslog mailing list