[FFmpeg-devel] [PATCH] parse audio in ogm

Justin Ruggles justinruggles
Mon May 26 02:12:24 CEST 2008


M?ns Rullg?rd wrote:
> Justin Ruggles <justinruggles at bellsouth.net> writes:
> 
>> Hi,
>>
>> This fixes Issue165.  It seems that any type of audio that can be
>> wrapped in wav can be wrapped in ogm, and that it does not necessarily
>> have exactly one frame per packet.
> 
> Hardly surprising.
> 
>> Index: libavformat/oggparseogm.c
>> ===================================================================
>> --- libavformat/oggparseogm.c	(revision 13380)
>> +++ libavformat/oggparseogm.c	(working copy)
>> @@ -68,6 +68,7 @@
>>          acid[4] = 0;
>>          cid = strtol(acid, NULL, 16);
>>          st->codec->codec_id = codec_get_id(codec_wav_tags, cid);
>> +        st->need_parsing = AVSTREAM_PARSE_FULL;
>>      }
>>  
>>      p += 4;                     /* useless size field */
> 
> Am I correct to assume that there is no way to tell when the parsing
> is actually needed?  If the answer is yes, the patch is OK.  Either
> way, do you have a sample?

I don't think there is a way to know.  From what I can tell, most other
demuxers either set it unconditionally or only for a list of explicitly
specified codecs.

These 2 samples are associated with Issue165.
http://samples.mplayerhq.hu/ogg/DShow-NEW/ogm+ac3/bots01.ogm
http://samples.mplayerhq.hu/ogg/DShow-NEW/ogm+ac3/bots02.ogm

With the patch, they play, but there are unrelated errors which probably
have to do with the AC3 parser and are not unique to these samples or to
ogm.  I've been trying to work on it, but I haven't been able to figure
it out yet.  The same thing happens with the sample from Issue408.

-Justin





More information about the ffmpeg-devel mailing list