From 8bea4aee4fc8d2169b8bebc3dd49dc8e989ba936 Mon Sep 17 00:00:00 2001 From: David Conrad Date: Wed, 5 Sep 2007 00:23:46 +0000 Subject: [PATCH] Only write extradata if it exists Originally committed as revision 10328 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/matroskaenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index fe419b2699..0f59fc3359 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -420,7 +420,7 @@ static int mkv_write_tracks(AVFormatContext *s) if (codec->codec_id == CODEC_ID_VORBIS || codec->codec_id == CODEC_ID_THEORA) { if (put_xiph_codecpriv(pb, codec) < 0) return -1; - } else { + } else if (codec->extradata_size) { put_ebml_binary(pb, MATROSKA_ID_CODECPRIVATE, codec->extradata, codec->extradata_size); } }