[FFmpeg-devel] [PATCH] ogg muxer fixes
Justin Ruggles
justin.ruggles
Sun Jun 21 16:25:22 CEST 2009
Baptiste Coudurier wrote:
> Hi Justin,
>
> Justin Ruggles wrote:
>> Hi,
>>
>> This patch adds speex support to the ogg muxer. It basically does the
>> same thing as Ogg/FLAC, in that the 1st packet is a global header from
>> extradata and the 2nd packet is vorbiscomment metadata.
>>
>> This seems to work just fine for speex-to-speex stream copy, but
>> probably would not work for flv-to-speex because flv doesn't to have any
>> speex extradata from what I can tell. I guess a header could be
>> constructed, but that would be a separate patch to the flv demuxer.
>>
>> This patch is a precursor to libspeex encoding support, which I'll be
>> sending shortly.
>>
>> -Justin
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> Index: libavformat/oggenc.c
>> ===================================================================
>> @@ -144,6 +188,12 @@
>> av_log(s, AV_LOG_ERROR, "Extradata corrupted\n");
>> av_freep(&st->priv_data);
>> }
>> + } else if (st->codec->codec_id == CODEC_ID_SPEEX) {
>> + if (ogg_build_speex_headers(st->codec, oggstream,
>> + st->codec->flags & CODEC_FLAG_BITEXACT) < 0) {
>> + av_log(s, AV_LOG_ERROR, "error writing Speex headers\n");
>> + av_freep(&st->priv_data);
>> + }
>
> return error here with the return code of the func :>
> Yes, it seems flac miss it too, this needs a fix.
Here is a set of 4 patches to fix that for flac and a few other minor
changes.
-Justin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-oggenc-check-for-failed-av_mallocz.patch
Type: text/x-patch
Size: 1142 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090621/cac22e19/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-cosmetics-spacing-and-comments.patch
Type: text/x-patch
Size: 1394 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090621/cac22e19/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-oggenc-return-error-value-from-ogg_build_flac_heade.patch
Type: text/x-patch
Size: 1124 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090621/cac22e19/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-oggenc-Change-error-log-text.-An-error-here-does-no.patch
Type: text/x-patch
Size: 831 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090621/cac22e19/attachment-0003.bin>
More information about the ffmpeg-devel
mailing list