[Ffmpeg-devel] Re: [PATCH] mp4 codecs objecttype handling (original) (raw)
Michael Niedermayer michaelni
Sat Feb 11 16:23:03 CET 2006
- Previous message: [Ffmpeg-devel] Re: [PATCH] mp4 codecs objecttype handling
- Next message: [Ffmpeg-devel] [patch] fix wma playback after vlc->vlc2 transition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi
On Sat, Feb 11, 2006 at 02:30:40PM +0100, Baptiste COUDURIER wrote: [...]
> [...] > >> @@ -650,12 +671,22 @@ static int movreadesds(MOVContext *c, >> >> len = movmp4readdescr(pb, &tag); >> if (tag == MP4DecConfigDescrTag) { >> + enum CodecID id; >> + >> sc->esds.objecttypeid = getbyte(pb); >> sc->esds.streamtype = getbyte(pb); >> sc->esds.buffersizedb = getbe24(pb); >> sc->esds.maxbitrate = getbe32(pb); >> sc->esds.avgbitrate = getbe32(pb); >> >> + id = codecgetid(mp4codectags, sc->esds.objecttypeid); >> + if (id >= 0) { >> + AVCodec *codec; >> + codec = avcodecfinddecoder(id); >> + if (codec) >> + st->codec->codecid = id; >> + } > > wth is this supposed to do? why not: > > if(st->codec->codecid <= 0)_ _> st->codec->codecid= codecgetid(mp4codectags, sc->esds.objecttypeid); > >
MOV 4CC is 'mp4v' and parser actually assigns codecid to CODECIDMPEG4. And objecttype is MPEG2 for example : http://www.coudurier.com/mpeg2inmp4.mp4
ok, so sc->esds.object_type_id should be prefered over MOV 4CC
It is not 0. I just ensure that the codec exists before overriding.
and in which case is that needed / wanted / usefull?
[...]
+/* http://gpac.sourceforge.net/tutorial/mediatypes.htm */ const CodecTag ffmovobjtype[] = {
+ { CODECIDMPEG4 , 1 }, + { CODECIDMPEG4 , 2 },
i dont think these 2 are correct, CODEC_ID_MPEG4 == MPEG4 video
[...]
-- Michael
- Previous message: [Ffmpeg-devel] Re: [PATCH] mp4 codecs objecttype handling
- Next message: [Ffmpeg-devel] [patch] fix wma playback after vlc->vlc2 transition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]