[FFmpeg-devel] [PATCH] WebM mux/demux

David Conrad lessen42
Sat Jun 5 00:40:34 CEST 2010


On Jun 2, 2010, at 6:49 PM, James Zern wrote:

> On Fri, May 28, 2010 at 20:06, Diego Biurrun <diego at biurrun.de> wrote:
>> On Fri, May 28, 2010 at 07:17:26PM -0400, James Zern wrote:
>>> The attached adds the webm doctype, audio packet buffering and
>>> keyframe clustering decision.
>> 
>>> --- libavformat/matroskaenc.c (revision 23368)
>>> +++ libavformat/matroskaenc.c (working copy)
>>> @@ -597,6 +604,11 @@ static int mkv_write_tracks(AVFormatCont
>>>                  break;
>>> 
>>>              case AVMEDIA_TYPE_AUDIO:
>>> +                if (codec->codec_id != CODEC_ID_VORBIS && !strcmp("webm", s->oformat->name)) {
>>> +                    av_log(s, AV_LOG_ERROR, "Only VP8 video and Vorbis audio are supported for WebM.\n");
>>> +                    return AVERROR(EINVAL);
>> 
>> These long lines could easily be broken.
>> 
>>> @@ -910,9 +926,39 @@ static int mkv_write_packet(AVFormatCont
>>> +
>>> +    if (mkv->cur_audio_pkt.data == NULL)
>> 
>> (!mkv->cur_audio_pkt.data)
>> 
> Sorry was keeping with the format of the file, both updated. I left
> the format string as one piece, but if you want to limit to 80
> characters on new code I'll make another split.
> 
>>> @@ -989,7 +1063,23 @@ AVOutputFormat matroska_muxer = {
>>>      .codec_tag = (const AVCodecTag* const []){ff_codec_bmp_tags, ff_codec_wav_tags, 0},
>>>      .subtitle_codec = CODEC_ID_TEXT,
>>>  };
>>> -
>>> +#endif
>>> +#if CONFIG_WEBM_MUXER
>>> +AVOutputFormat webm_muxer = {
>>> +};
>>> +#endif
>>> +#if CONFIG_MATROSKA_AUDIO_MUXER
>>>  AVOutputFormat matroska_audio_muxer = {
>> 
>> Put an empty line between those preprocessor directives..
>> 
> Done.

Split the muxing changes from adding the webm muxer and applied.



More information about the ffmpeg-devel mailing list