diff options
author | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:54 +0000 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2007-09-05 00:25:54 +0000 |
commit | dc4a9f6737c9844909a72ecc4b7260757eb2a8d8 (patch) | |
tree | 83e9c803c754aaecb483f387dc89c1e094ce12c5 /libavformat/matroskaenc.c | |
parent | 46d18a88e1199464cf1522f67127132f86f5bb2a (diff) | |
download | ffmpeg-dc4a9f6737c9844909a72ecc4b7260757eb2a8d8.tar.gz |
Match the behaviour betwen the bmp and wav codec tag lookups
Originally committed as revision 10380 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index c4b809f128..5becce4c9e 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -483,10 +483,15 @@ static int mkv_write_codecprivate(ByteIOContext *pb, AVCodecContext *codec, int } else if (codec->codec_type == CODEC_TYPE_VIDEO) { if (!codec->codec_tag) codec->codec_tag = codec_get_tag(codec_bmp_tags, codec->codec_id); + if (!codec->codec_tag) { + av_log(codec, AV_LOG_ERROR, "no bmp codec id found"); + ret = -1; + } put_bmp_header(&dyn_cp, codec, codec_bmp_tags, 0); } else if (codec->codec_type == CODEC_TYPE_AUDIO) { + if (!codec->codec_tag) codec->codec_tag = codec_get_tag(codec_wav_tags, codec->codec_id); if (!codec->codec_tag) { av_log(codec, AV_LOG_ERROR, "no wav codec id found"); |