Commit 978880c8 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

lavf/latmenc: Error out for unsupported codecs.

parent 70c8c8a8
......@@ -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_INVALIDDATA;
}
if (par->extradata_size > 0 &&
latm_decode_extradata(ctx, par->extradata, par->extradata_size) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment