diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-03-26 15:16:07 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2013-03-27 00:56:35 +0100 |
commit | fe995dcd84c6e2aca3216a10a996ecfbba964b6c (patch) | |
tree | 08ef809ea578075b22178dc052d348b78cd1f829 /libavformat/flvenc.c | |
parent | 9b481654e1513475b133b45677d85516080d64fb (diff) | |
download | ffmpeg-fe995dcd84c6e2aca3216a10a996ecfbba964b6c.tar.gz |
Only test the first frame for missing aac_adtstoasc bistream filter.
Many players ignore broken aac frames, so don't abort mov or flv
muxing when encountering one, just print a warning instead.
Fixes ticket #2380.
(cherry picked from commit 1741fece7073f51efdd837a4f307ea2cdf3d1cfb)
Diffstat (limited to 'libavformat/flvenc.c')
-rw-r--r-- | libavformat/flvenc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 97c00bf79e..5447840b2a 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -492,10 +492,13 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) return ret; } else if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 && (AV_RB16(pkt->data) & 0xfff0) == 0xfff0) { + if (!s->streams[pkt->stream_index]->nb_frames) { av_log(s, AV_LOG_ERROR, "Malformed AAC bitstream detected: " "use audio bistream filter 'aac_adtstoasc' to fix it " "('-bsf:a aac_adtstoasc' option with ffmpeg)\n"); return AVERROR_INVALIDDATA; + } + av_log(s, AV_LOG_WARNING, "aac bitstream error\n"); } if (flv->delay == AV_NOPTS_VALUE) |