Only write extradata if it exists

Originally committed as revision 10328 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
David Conrad 2007-09-05 00:23:46 +00:00
parent 07918a227a
commit 8bea4aee4f

View File

@ -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);
}
}