summaryrefslogtreecommitdiff
path: root/libavformat/mpjpegdec.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-01-07 14:55:43 +0100
committerMarton Balint <cus@passwd.hu>2020-02-11 00:15:19 +0100
commitdd81f73946b85134441c0a917dc4dadf7b70ba85 (patch)
treef9a8f0e7f94847f79f69ad04c83c2ffb1e6ccdaa /libavformat/mpjpegdec.c
parent212077eda46c4c3eb644774d2b1ccbeb3e322fff (diff)
downloadffmpeg-dd81f73946b85134441c0a917dc4dadf7b70ba85.tar.gz
avformat/mpjpegdec: Remove redundant initializations
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>
Diffstat (limited to 'libavformat/mpjpegdec.c')
-rw-r--r--libavformat/mpjpegdec.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/mpjpegdec.c b/libavformat/mpjpegdec.c
index 1e2ab0db1a..df2880412d 100644
--- a/libavformat/mpjpegdec.c
+++ b/libavformat/mpjpegdec.c
@@ -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 */