lavd: Drop unneeded av_init_packet()s
authorVittorio Giovara <vittorio.giovara@gmail.com>
Wed, 13 Jul 2016 15:41:35 +0000 (11:41 -0400)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Wed, 13 Jul 2016 22:20:27 +0000 (18:20 -0400)
The input packet is already unref'd by the calling function.

libavdevice/v4l2.c
libavdevice/x11grab.c

index 74fec51..47241e4 100644 (file)
@@ -861,7 +861,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 #endif
     int res;
 
-    av_init_packet(pkt);
     if ((res = mmap_read_frame(s1, pkt)) < 0) {
         return res;
     }
index da2bfa0..60e2560 100644 (file)
@@ -511,7 +511,6 @@ static int x11grab_read_packet(AVFormatContext *s1, AVPacket *pkt)
         nanosleep(&ts, NULL);
     }
 
-    av_init_packet(pkt);
     pkt->data = image->data;
     pkt->size = s->frame_size;
     pkt->pts  = curtime;