avformat/aiffdec: give friendly message if compressed codec tag is unsupported
authorPaul B Mahol <onemda@gmail.com>
Sun, 25 Oct 2015 11:48:36 +0000 (12:48 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 25 Oct 2015 13:07:03 +0000 (14:07 +0100)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/aiffdec.c

index f26951d..8d2701a 100644 (file)
@@ -128,6 +128,11 @@ static int get_aiff_header(AVFormatContext *s, int size,
     } else if (version == AIFF_C_VERSION1) {
         codec->codec_tag = avio_rl32(pb);
         codec->codec_id  = ff_codec_get_id(ff_codec_aiff_tags, codec->codec_tag);
+        if (codec->codec_id == AV_CODEC_ID_NONE) {
+            char tag[32];
+            av_get_codec_tag_string(tag, sizeof(tag), codec->codec_tag);
+            avpriv_request_sample(s, "unknown or unsupported codec tag: %s", tag);
+        }
         size -= 4;
     }