[FFmpeg-cvslog] avformat/avienc: Dont search for startcodes in inserted empty avi frames

Michael Niedermayer git at videolan.org
Wed Sep 17 02:44:17 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Sep 17 00:38:08 2014 +0200| [3c020b69595954ac18ba27d6b1d8009f7e6bad29] | committer: Michael Niedermayer

avformat/avienc: Dont search for startcodes in inserted empty avi frames

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c020b69595954ac18ba27d6b1d8009f7e6bad29
---

 libavformat/avienc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index c45bac2..c9d8b7f 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -576,7 +576,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
     AVIStream *avist    = s->streams[stream_index]->priv_data;
     AVCodecContext *enc = s->streams[stream_index]->codec;
 
-    if (enc->codec_id == AV_CODEC_ID_H264 && enc->codec_tag == MKTAG('H','2','6','4')) {
+    if (enc->codec_id == AV_CODEC_ID_H264 && enc->codec_tag == MKTAG('H','2','6','4') && pkt->size) {
         int ret = ff_check_h264_startcode(s, s->streams[stream_index], pkt);
         if (ret < 0)
             return ret;



More information about the ffmpeg-cvslog mailing list