|
List Info
Thread: ogg flac header fix
|
|
| ogg flac header fix |
  United States |
2008-03-29 17:33:29 |
Hi,
Here is a small patch to fix Ogg/FLAC encoding. Current
code uses the
wrong size for the first metadata packet. The fix is pretty
obvious,
but I'm not oggenc.c maintainer, so I thought I would go
ahead and post
it first.
-Justin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
|
|
|
| Re: ogg flac header fix |
  United States |
2008-03-29 17:43:10 |
Justin Ruggles wrote:
> Hi,
>
> Here is a small patch to fix Ogg/FLAC encoding.
Current code uses the
> wrong size for the first metadata packet. The fix is
pretty obvious,
> but I'm not oggenc.c maintainer, so I thought I would
go ahead and post
> it first.
oops. new patch w/ regression test update.
-Justin
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
|
|
|
| Re: ogg flac header fix |

|
2008-03-29 18:09:08 |
Justin Ruggles <justinruggles bellsouth.net> writes:
> Hi,
>
> Here is a small patch to fix Ogg/FLAC encoding.
Current code uses the
> wrong size for the first metadata packet. The fix is
pretty obvious,
> but I'm not oggenc.c maintainer, so I thought I would
go ahead and post
> it first.
>
> -Justin
>
>
> Index: libavformat/oggenc.c
>
============================================================
=======
> --- libavformat/oggenc.c (revision 12624)
> +++ libavformat/oggenc.c (working copy)
>  -88,8 +88,8 
> uint8_t *p;
> if (extradata_size != 34)
> return -1;
> - oggstream->header_len[0] = 79;
> - oggstream->header[0] = av_mallocz(79); // per
ogg flac specs
> + oggstream->header_len[0] = 51;
> + oggstream->header[0] = av_mallocz(51); // per
ogg flac specs
Seems correct. The figure 79 is for the entire Ogg page,
whereas this
buffer holds just the payload.
I have to say it's a pointless number to mention in the
spec, though.
But then again, what else is to expect when dealing with
Xiph.
--
Måns Rullgård
mans mansr.com
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
|
|
| Re: ogg flac header fix |
  France |
2008-03-29 22:20:54 |
Hi,
Justin Ruggles wrote:
> Justin Ruggles wrote:
>> Hi,
>>
>> Here is a small patch to fix Ogg/FLAC encoding.
Current code uses the
>> wrong size for the first metadata packet. The fix
is pretty obvious,
>> but I'm not oggenc.c maintainer, so I thought I
would go ahead and post
>> it first.
>
> oops. new patch w/ regression test update.
>
> -Justin
>
>
>
>
------------------------------------------------------------
------------
>
> Index: tests/libav.regression.ref
>
============================================================
=======
> --- tests/libav.regression.ref (revision 12624)
> +++ tests/libav.regression.ref (working copy)
>  -84,8 +84,8 
> 8d117c49d6b210abe783d1b0b897cec7
*./tests/data/b-libav.voc
> 32768 ./tests/data/b-libav.voc
> ./tests/data/b-libav.voc CRC=0x49972c8c
> -d7e6e9091a600b7208b29500be94aa89
*./tests/data/b-libav.ogg
> -23624 ./tests/data/b-libav.ogg
> +8ac1fa6e0ee5d47ea98aea17b67d5908
*./tests/data/b-libav.ogg
> +23596 ./tests/data/b-libav.ogg
> ./tests/data/b-libav.ogg CRC=0x93baa056
> ce356ce2708cb6033ab5d762da93cfd4
*./tests/data/b-libav-yuv420p.yuv
> 304128 ./tests/data/b-libav-yuv420p.yuv
> Index: libavformat/oggenc.c
>
============================================================
=======
> --- libavformat/oggenc.c (revision 12624)
> +++ libavformat/oggenc.c (working copy)
>  -88,8 +88,8 
> uint8_t *p;
> if (extradata_size != 34)
> return -1;
> - oggstream->header_len[0] = 79;
> - oggstream->header[0] = av_mallocz(79); // per
ogg flac specs
> + oggstream->header_len[0] = 51;
> + oggstream->header[0] = av_mallocz(51); // per
ogg flac specs
> p = oggstream->header[0];
> bytestream_put_byte(&p, 0x7F);
> bytestream_put_buffer(&p, "FLAC",
4);
>
Patch ok.
--
Baptiste COUDURIER GnuPG Key
Id: 0x5C1ABAAA
SMARTJOG S.A. http://www.smartjog.com
Key fingerprint
8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
|
|
| Re: ogg flac header fix |
  United States |
2008-03-29 22:40:47 |
Baptiste Coudurier wrote:
> Hi,
>
> Justin Ruggles wrote:
>> Justin Ruggles wrote:
>>> Hi,
>>>
>>> Here is a small patch to fix Ogg/FLAC encoding.
Current code uses the
>>> wrong size for the first metadata packet. The
fix is pretty obvious,
>>> but I'm not oggenc.c maintainer, so I thought I
would go ahead and post
>>> it first.
>> oops. new patch w/ regression test update.
>>
>> -Justin
>>
>>
>>
>>
------------------------------------------------------------
------------
>>
>> Index: tests/libav.regression.ref
>>
============================================================
=======
>> --- tests/libav.regression.ref (revision 12624)
>> +++ tests/libav.regression.ref (working copy)
>>  -84,8 +84,8 
>> 8d117c49d6b210abe783d1b0b897cec7
*./tests/data/b-libav.voc
>> 32768 ./tests/data/b-libav.voc
>> ./tests/data/b-libav.voc CRC=0x49972c8c
>> -d7e6e9091a600b7208b29500be94aa89
*./tests/data/b-libav.ogg
>> -23624 ./tests/data/b-libav.ogg
>> +8ac1fa6e0ee5d47ea98aea17b67d5908
*./tests/data/b-libav.ogg
>> +23596 ./tests/data/b-libav.ogg
>> ./tests/data/b-libav.ogg CRC=0x93baa056
>> ce356ce2708cb6033ab5d762da93cfd4
*./tests/data/b-libav-yuv420p.yuv
>> 304128 ./tests/data/b-libav-yuv420p.yuv
>> Index: libavformat/oggenc.c
>>
============================================================
=======
>> --- libavformat/oggenc.c (revision 12624)
>> +++ libavformat/oggenc.c (working copy)
>>  -88,8 +88,8 
>> uint8_t *p;
>> if (extradata_size != 34)
>> return -1;
>> - oggstream->header_len[0] = 79;
>> - oggstream->header[0] = av_mallocz(79); //
per ogg flac specs
>> + oggstream->header_len[0] = 51;
>> + oggstream->header[0] = av_mallocz(51); //
per ogg flac specs
>> p = oggstream->header[0];
>> bytestream_put_byte(&p, 0x7F);
>> bytestream_put_buffer(&p,
"FLAC", 4);
>>
>
> Patch ok.
applied.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
|
|
[1-5]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|