mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-23 15:30:01 +01:00
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 1741fece70)
This commit is contained in:
@@ -3097,8 +3097,11 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
}
|
||||
} 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, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
|
||||
} else {
|
||||
avio_write(pb, pkt->data, size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user