diff options
Diffstat (limited to 'libavformat/flvenc.c')
-rw-r--r-- | libavformat/flvenc.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 487993cd9a..cea0d02e3c 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -1,23 +1,25 @@ /* * FLV muxer - * Copyright (c) 2003 The Libav Project + * Copyright (c) 2003 The FFmpeg Project * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ + +#include "libavutil/intreadwrite.h" #include "avformat.h" #include "flv.h" #include "internal.h" @@ -403,6 +405,10 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) } if (!flv->delay && pkt->dts < 0) flv->delay = -pkt->dts; + } else if (enc->codec_id == CODEC_ID_AAC && pkt->size > 2 && + (AV_RB16(pkt->data) & 0xfff0) == 0xfff0) { + av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n"); + return -1; } ts = pkt->dts + flv->delay; // add delay to force positive dts |