From patchwork Mon Sep 17 19:33:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 10349 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:12c4:0:0:0:0:0 with SMTP id 65-v6csp3884772jap; Mon, 17 Sep 2018 12:35:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYRfpVOV3ZvUg+IMNVanFToYerkiQn1o3ufVh99BQuwNl2mS4onYzFnDXwQcQQ1TVrSM3Mi X-Received: by 2002:a1c:e289:: with SMTP id z131-v6mr12920394wmg.32.1537212911785; Mon, 17 Sep 2018 12:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537212911; cv=none; d=google.com; s=arc-20160816; b=YH4U1Idbzl0Bq3NEpa+/y3tntppfllPw0zJWdMnF0+ybK+8auju7qMZFhTb2UmvXJl GXF0dQpnsyzVrY4MMttpo6GELukxdmcroiZwamep4773qnDBaki7RGe38Hq0Vnpzz76d 6uOOelDFlMq/JUt7UGA9NgRzwzPswLyZoXqZMLp2GfzZbsb12goFE+7aeVWq6xynxKoG Ob0XmbvtQJa3wHVfjspQichVrxHFa0vR0ReIA/MHxPQ5B1+BbcMjcWmOho8xz1PLj3lp B8gv6I3ejAWKB9rFBL+lEZK7Okq2v06lAKAaLSmmsxwTNHptyQX5kRw2qVz8U99A1RyQ yJvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=mVINUG9KvK3IJ7Lwwbs22U32/aKuOo+NXaLMNhQvG/k=; b=efJ3uyBLe3gJHGKF9V7r2F3jux3KbicpK6MjUO/5TS0GOZt3jf4SmPoagmQYs2cnA9 5vobHjnFCIqRP98KAfV8MeL9PKUInqSHrDEBoa73tI8HKuN9TIoNYUwU7GpPRCgyufHI PEn0Z6HO7N3YJJpgXL6G7UC4l0lu9fNrk1YProAEcWGt5EEM876PJaOWnClxdWlL62z2 0AdDCtM0dgOPN3Nc0QJ0Y0nhE4Fh9jlLWzsTknhwASI7lnhm7vPbvluBXDV6YMJEdPa5 +57Uz4Lor9Jk5jGZJhIDfKlGhCmiZogNparR9OIM9Byu4WWDYd/Mo6b9Vl72VnJxld3x LKxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h144-v6si7596384wme.116.2018.09.17.12.35.11; Mon, 17 Sep 2018 12:35:11 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D743268A759; Mon, 17 Sep 2018 22:34:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-1.mx.upcmail.net (vie01a-qmta-pe01-1.mx.upcmail.net [62.179.121.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 25FEB68A50D for ; Mon, 17 Sep 2018 22:34:44 +0300 (EEST) Received: from [172.31.218.46] (helo=vie01a-dmta-pe06-1.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1g1zIO-0004Mg-MN for ffmpeg-devel@ffmpeg.org; Mon, 17 Sep 2018 21:34:56 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe06.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1g1zIJ-0006u7-EM for ffmpeg-devel@ffmpeg.org; Mon, 17 Sep 2018 21:34:51 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id cjag1y03Z0S5wYM01jahAy; Mon, 17 Sep 2018 21:34:42 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 17 Sep 2018 21:33:59 +0200 Message-Id: <20180917193400.3276-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.18.0 Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/zmbv: Update decomp_len in raw frames 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" decomp_len is used in raw frames, so it should not be left at the value from whatever was decoded previously (which may be any other frame) Signed-off-by: Michael Niedermayer --- libavcodec/zmbv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index 9e27a2caad..177993d0a6 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -525,6 +525,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac return AVERROR_INVALIDDATA; } memcpy(c->decomp_buf, buf, len); + c->decomp_len = len; } else { // ZLIB-compressed data c->zstream.total_in = c->zstream.total_out = 0; c->zstream.next_in = (uint8_t*)buf;