[FFmpeg-devel] [PATCH] oggparseskeleton: Fix fisbone header parsing

James Almer jamrial at gmail.com
Sat Jul 6 21:27:00 CEST 2013


On 06/07/13 4:12 PM, Michael Niedermayer wrote:
> On Sat, Jul 06, 2013 at 01:38:32PM -0300, James Almer wrote:
>> On 06/07/13 8:37 AM, Michael Niedermayer wrote:
>>>> diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c
>>>> index 307387d..56f5713 100644
>>>> --- a/libavformat/oggparseskeleton.c
>>>> +++ b/libavformat/oggparseskeleton.c
>>>
>>>> @@ -37,9 +37,6 @@ static int skeleton_header(AVFormatContext *s, int idx)
>>>>      strcpy(st->codec->codec_name, "skeleton");
>>>>      st->codec->codec_type = AVMEDIA_TYPE_DATA;
>>>>  
>>>> -    if (os->psize < 8)
>>>> -        return -1;
>>>> -
>>>>      if (!strncmp(buf, "fishead", 8)) {
>>>>          if (os->psize < 64)
>>>>              return -1;
>>>
>>> why?
>>> this is supposed to check if buf contains 8 bytes for the strncmp
>>>
>>> rest of the patch split & applied
>>>
>>> thanks
>>
>> That line generates an error about the Skeleton header parsing failing.
>> This is because the EOS page has a single packet of size 0, so skeleton_header()
>> returns -1.
> 
> please upload that ogg file

Uploaded to the FTP income folder, oggskeleton_v3.ogg and oggskeleton_v4.ogg

You can check in https://wiki.xiph.org/Ogg_Skeleton for the Skeleton structure 
definition, which mentions the EOS page containing a single packet of size 0, and 
is present in both samples.

Regards.


More information about the ffmpeg-devel mailing list