Commit 96f94624 authored by Gyan Doshi's avatar Gyan Doshi Committed by James Almer

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: 's avatarJames Almer <jamrial@gmail.com>
parent 02dba49d
......@@ -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);
......
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