You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avformat/adtsenc: allow only AAC streams
The ADTS muxer will silently (attempt to) mux any audio stream passed to it. Patch adds a codec check. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -99,6 +99,10 @@ static int adts_init(AVFormatContext *s)
|
||||
ADTSContext *adts = s->priv_data;
|
||||
AVCodecParameters *par = s->streams[0]->codecpar;
|
||||
|
||||
if (par->codec_id != AV_CODEC_ID_AAC) {
|
||||
av_log(s, AV_LOG_ERROR, "Only AAC streams can be muxed by the ADTS muxer\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
if (par->extradata_size > 0)
|
||||
return adts_decode_extradata(s, adts, par->extradata,
|
||||
par->extradata_size);
|
||||
|
Reference in New Issue
Block a user