From patchwork Tue Jan 7 13:55:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 17238 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 0785744AC83 for ; Tue, 7 Jan 2020 15:56:22 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DE59968AD3D; Tue, 7 Jan 2020 15:56:21 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CFC8E68ACEF for ; Tue, 7 Jan 2020 15:56:12 +0200 (EET) Received: by mail-wr1-f65.google.com with SMTP id t2so54034086wrr.1 for ; Tue, 07 Jan 2020 05:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ROToNw8auoDYXWOxlQHAjkjB6EcpmvhdFxIV1Ep00SY=; b=lp/kB/HjmkIEOyycxjrGRNLJJuZ3UeldPr+wtIIQtY91P28e7H5KyLoGhrfxV83AQ0 zruHXATF5F4BIXBGcNYnja8izS5OBsOISKr4ZTiOx3lIJj17ldtFz3kyfefqCXgtOQyZ 5wtJueCDP+EtxSLN61QefS+50pqPAT/RLdZbrCdAMyFNckyhJcxKBChfl6fQn5t2dNGO xN+S3XXjIjo1cq62nowETY4yZ8lIp1C/RSobBNUdypdyg2Ry6iiNFUof9G12/AefknaY 2Z7YQ17TvZRNTLMP8tVAjPkqnxfS0jFJNKeQwCNNIapZWFTKCssbAYTcZEVjBH2XZOIF CyCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ROToNw8auoDYXWOxlQHAjkjB6EcpmvhdFxIV1Ep00SY=; b=aNPToBbWbWrRi3tq/Sh5sGYsrXJE9dkg0iMS6a4FoH6d8e7wtUqRSzhq4mOTb4sEcd sWMZKfwh3VXWs1jAinrKy5jluNX9Hc0xYTfnftZAYypMKqEayIg+7iPeGzznVDbfnUQN YgAj5iGwJ1GxqDcwERksSV6n/rM8tOXWRS2Ndx14p6Cm5k+9y0PPyH34YCOW4x2rLwnv TvIoLXtC4k5oVxFCqL2O3DTp8ld/aVsEYizcvy5x5MW2gabMuP5kdA8WN4qiiMJ4Ejk7 XVHa5snk0e52Dcobyok37TatoRPKYuLf7k9AjC4uaqPrZ7l0JqryeuJ7EHBT9zDdLfWS GqIA== X-Gm-Message-State: APjAAAWb2fSJbTG6Pwgxdvp4Z4oXAhAhAxIQLviev78H6ZzuGsw1o3Q/ 6S4+GplwfJfVB7eOA+7ezAHjlh81 X-Google-Smtp-Source: APXvYqz4S1zjpN+VD9ff6njxGNgBXDus8jDbIf6bN1RCzXi6RAlmuJzc/8VvODs8FCBlLSG8rABqag== X-Received: by 2002:a5d:620b:: with SMTP id y11mr106564251wru.230.1578405372257; Tue, 07 Jan 2020 05:56:12 -0800 (PST) Received: from sblaptop.fritz.box (ipbcc08bbf.dynamic.kabel-deutschland.de. [188.192.139.191]) by smtp.gmail.com with ESMTPSA id e18sm76167730wrr.95.2020.01.07.05.56.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2020 05:56:11 -0800 (PST) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 7 Jan 2020 14:55:43 +0100 Message-Id: <20200107135549.22581-5-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200107135549.22581-1-andreas.rheinhardt@gmail.com> References: <20200107135549.22581-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 05/11] avformat/mpjpegdec: Remove redundant initializations X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The AVPacket destined for a demuxer's output has already been initialized before it reaches the demuxer. Signed-off-by: Andreas Rheinhardt --- libavformat/mpjpegdec.c | 4 +--- 1 file changed, 1 insertion(+), 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 */