skip 0byte packets
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>
Mon, 27 Mar 2006 16:43:04 +0000 (16:43 +0000)
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>
Mon, 27 Mar 2006 16:43:04 +0000 (16:43 +0000)
Originally committed as revision 5231 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/adtsenc.c

index 239d0ab7c81f78ce09c64dc2f695e758d2c6dd41..e67455ec80df3373ae979a06303d9a477821f341 100644 (file)
@@ -97,6 +97,8 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
     ADTSContext *adts = s->priv_data;
     ByteIOContext *pb = &s->pb;
 
+    if (!pkt->size)
+        return 0;
     if(adts->write_adts)
         adts_write_frame_header(s, pkt->size);
     put_buffer(pb, pkt->data, pkt->size);