From patchwork Thu Oct 20 20:57:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Cadhalpun X-Patchwork-Id: 1094 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.133 with SMTP id o127csp806392vsd; Thu, 20 Oct 2016 13:57:27 -0700 (PDT) X-Received: by 10.28.2.68 with SMTP id 65mr143212wmc.5.1476997047114; Thu, 20 Oct 2016 13:57:27 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t64si450049wmt.86.2016.10.20.13.57.26; Thu, 20 Oct 2016 13:57:27 -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; dkim=neutral (body hash did not verify) header.i=@googlemail.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; dmarc=fail (p=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B19F4689BD0; Thu, 20 Oct 2016 23:57:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 81AB66898B5 for ; Thu, 20 Oct 2016 23:57:14 +0300 (EEST) Received: by mail-lf0-f67.google.com with SMTP id l131so2091773lfl.0 for ; Thu, 20 Oct 2016 13:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=Tmz8CQlwH7YKI2Q1uLxlYD5TtKdSfAOE4pWztSz0hNA=; b=z5ucZrBuNH/YIc7UyV8sCXnTKD7WuaOwGGPwFOgpehxI3SWBr+/qW2C7c9uA8+cjzU EtHI0rcZCfBcNi/ES/llDCZ2tmlZqg4Euk109AglvwHeRu8T1q+GiNTMx5HZNcFh/jf8 4g9ytsEB9bXLDl5AqeHFZvPjkvWzEsHqNzDHJcjXk2vRzSXEfaynZ+qpUvjGHqT6XT7o VnTz+1XpZnbjpKeK4z8G1GUXCjt/SV1H2kY5EcoPlDRga3Jwd9ddMc3b64Zlw9lrlP07 cjsfyy1V3R3oPqdlyiwY5fS9qyK/H7bRhwgZFxTcA2xgp/iJPmp4TCoTAOrvNTAWYR9Q C2MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=Tmz8CQlwH7YKI2Q1uLxlYD5TtKdSfAOE4pWztSz0hNA=; b=XX9LMSm3EHT0g3mhYgDgf01z5f/yhthM5gD5aNhIzYKfwD960U4DL1RtYVDzbO5Dti tgwr4bJqwE4xsAavyKMLHPiPHUu5jNECI6pmSBIJ6pVkCTxgbLl/CGL+vHPkn5bE7c6G Ct8XhShErD0vhg8BB4v9HQ8l1sNtqx2/9PvteNFZg8HYz4R6HgX6MO5DwQ0+WyOeHNZi FY948quhFIdKw3lvw0Hs5Id816kzOJ24QVZm66MwErJvbjJAhO5srqyIP/Jqn83il14t r++sOr1RsiLz7W4o0PdJUx1Xd6tnh4PJsZ7SpDG8jV+qEWi3ceNIX+A10e8/nNJYOfVL f/gQ== X-Gm-Message-State: AA6/9Rk+QtPAoLezWtWBvjS8YYuiiAnEWZCCQbLwrpsCCy7ZrkmfIoT5Y23dJXYX7v8Ehw== X-Received: by 10.28.25.68 with SMTP id 65mr131290wmz.93.1476997036904; Thu, 20 Oct 2016 13:57:16 -0700 (PDT) Received: from [192.168.2.21] (pD9E8EB48.dip0.t-ipconnect.de. [217.232.235.72]) by smtp.googlemail.com with ESMTPSA id j1sm71201718wjl.21.2016.10.20.13.57.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 13:57:16 -0700 (PDT) From: Andreas Cadhalpun X-Google-Original-From: Andreas Cadhalpun To: FFmpeg development discussions and patches Message-ID: <2b4bbc3d-ed29-417a-eeb6-131b826a6881@googlemail.com> Date: Thu, 20 Oct 2016 22:57:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] mpeg12dec: unref discarded picture from extradata 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Otherwise another frame gets referenced into picture, triggering an assert (from commit 13aae8) in av_frame_ref. Signed-off-by: Andreas Cadhalpun --- libavcodec/mpeg12dec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 44f7b61..ac8160d 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -2808,6 +2808,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx, void *data, avctx->extradata, avctx->extradata_size); if (*got_output) { av_log(avctx, AV_LOG_ERROR, "picture in extradata\n"); + av_frame_unref(picture); *got_output = 0; } s->extradata_decoded = 1;