[FFmpeg-cvslog] lavf/latmenc: Error out for unsupported codecs.
Carl Eugen Hoyos
git at videolan.org
Thu Mar 21 01:10:02 EET 2019
ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Wed Nov 1 02:15:10 2017 +0100| [978880c803d1ce4a627591b8974f447cd6b05c6e] | committer: Carl Eugen Hoyos
lavf/latmenc: Error out for unsupported codecs.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=978880c803d1ce4a627591b8974f447cd6b05c6e
---
libavformat/latmenc.c | 4 ++++
1 file changed, 4 insertions(+)
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)
More information about the ffmpeg-cvslog
mailing list