summaryrefslogtreecommitdiff
path: root/libavformat/flvenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/flvenc.c')
-rw-r--r--libavformat/flvenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 502da0f0c5..e1dd43f716 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -493,10 +493,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 bitstream 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)