X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Flatmenc.c;h=8eb219f8aee42ebeb905ebd908a2b364bc6828ab;hb=60f75c9976368d9921ea5cf2b9193ff8ace1602d;hp=273197bb547c91994c4e1503fd66681e16ee90ad;hpb=f32d2939555706365ad1d39aadd5ee7ce1d9fa4f;p=ffmpeg diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c index 273197bb547..8eb219f8aee 100644 --- a/libavformat/latmenc.c +++ b/libavformat/latmenc.c @@ -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)