[FFmpeg-devel] [PATCH] WebM mux/demux
Diego Biurrun
diego
Sat May 29 02:06:43 CEST 2010
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)
> @@ -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..
Diego
More information about the ffmpeg-devel
mailing list