]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/latmenc.c
avformat/matroskadec: Typos, nits and cosmetics
[ffmpeg] / libavformat / latmenc.c
index 273197bb547c91994c4e1503fd66681e16ee90ad..8eb219f8aee42ebeb905ebd908a2b364bc6828ab 100644 (file)
@@ -89,6 +89,10 @@ static int latm_write_header(AVFormatContext *s)
 
     if (par->codec_id == AV_CODEC_ID_AAC_LATM)
         return 0;
+    if (par->codec_id != AV_CODEC_ID_AAC && par->codec_id != AV_CODEC_ID_MP4ALS) {
+        av_log(ctx, AV_LOG_ERROR, "Only AAC, LATM and ALS are supported\n");
+        return AVERROR(EINVAL);
+    }
 
     if (par->extradata_size > 0 &&
         latm_decode_extradata(ctx, par->extradata, par->extradata_size) < 0)