avformat/avienc: Dont search for startcodes in inserted empty avi frames
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Sep 2014 22:38:08 +0000 (00:38 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Sep 2014 22:39:09 +0000 (00:39 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/avienc.c

index c45bac2..c9d8b7f 100644 (file)
@@ -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;