summaryrefslogtreecommitdiff
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-02-10 18:02:59 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-02-10 21:00:56 +0100
commit6b171f046c6fc6aa06e0585828a6f51ad0fd43eb (patch)
tree4c89a33880f8b4ff481bc38f19e942e31d6fa4f3 /libavformat/matroskaenc.c
parentf0703b6cba655dfc215903d22980d8e39fff0349 (diff)
lavf/matroskaenc: provide more feedback in case of unsupported codec
Also return meaningful error code.
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 3606a99722..5c1e2f1ec1 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -498,8 +498,9 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo
if (!codec->codec_tag)
codec->codec_tag = ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id);
if (!codec->codec_tag) {
- av_log(s, AV_LOG_ERROR, "No bmp codec ID found.\n");
- ret = -1;
+ av_log(s, AV_LOG_ERROR, "No bmp codec tag found for codec %s\n",
+ avcodec_get_name(codec->codec_id));
+ ret = AVERROR(EINVAL);
}
ff_put_bmp_header(dyn_cp, codec, ff_codec_bmp_tags, 0);
@@ -509,8 +510,9 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo
unsigned int tag;
tag = ff_codec_get_tag(ff_codec_wav_tags, codec->codec_id);
if (!tag) {
- av_log(s, AV_LOG_ERROR, "No wav codec ID found.\n");
- ret = -1;
+ av_log(s, AV_LOG_ERROR, "No wav codec tag found for codec %s\n",
+ avcodec_get_name(codec->codec_id));
+ ret = AVERROR(EINVAL);
}
if (!codec->codec_tag)
codec->codec_tag = tag;