]> git.sesse.net Git - ffmpeg/commitdiff
avformat/mpjpegdec: Remove redundant initializations
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 7 Jan 2020 13:55:43 +0000 (14:55 +0100)
committerMarton Balint <cus@passwd.hu>
Mon, 10 Feb 2020 23:15:19 +0000 (00:15 +0100)
The AVPacket destined for a demuxer's output has already been
initialized before it reaches the demuxer.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
libavformat/mpjpegdec.c

index 1e2ab0db1ad71aa4c802d786e90a4139cabe1539..df2880412d13637a80c8ae25b54f829623fdacea 100644 (file)
@@ -331,9 +331,7 @@ static int mpjpeg_read_packet(AVFormatContext *s, AVPacket *pkt)
         int remaining = 0, len;
 
         const int read_chunk = 2048;
-        av_init_packet(pkt);
-        pkt->data = NULL;
-        pkt->size = 0;
+
         pkt->pos  = avio_tell(s->pb);
 
         while ((ret = ffio_ensure_seekback(s->pb, read_chunk - remaining)) >= 0 && /* we may need to return as much as all we've read back to the buffer */