summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2017-11-01 02:15:10 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2019-03-21 00:00:47 +0100
commit978880c803d1ce4a627591b8974f447cd6b05c6e (patch)
tree91df87ddbe7dea3a071bb14ee58e91de39107ac3 /libavformat
parent70c8c8a818f39bc262565ec29fae2baffb3e1660 (diff)
lavf/latmenc: Error out for unsupported codecs.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/latmenc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
index 273197bb54..3b2d7af430 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_INVALIDDATA;
+ }
if (par->extradata_size > 0 &&
latm_decode_extradata(ctx, par->extradata, par->extradata_size) < 0)