From patchwork Sun Feb 11 14:37:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 7554 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.150.1 with SMTP id c1csp3026139jai; Sun, 11 Feb 2018 06:38:22 -0800 (PST) X-Google-Smtp-Source: AH8x224j7Wpxc3qCRUXNBj76hKG07liOYgjT6t7330nEkoDFr2ZO/wkFAXztAgLCT/0T9kVKAToG X-Received: by 10.223.170.153 with SMTP id h25mr2524429wrc.148.1518359902800; Sun, 11 Feb 2018 06:38:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518359902; cv=none; d=google.com; s=arc-20160816; b=kD5Xq0JWWZsqOrn+os6z05PARg83/+74NS9HCE2RJaEl0A1fmylvJgvsd4j10cx2Iv lvBzSu497/ZJCkaEYVjiPr5KJql6NPHbaBl5iR0fIt53fjYtTK53KdxXCskkWeiSv+Nb BMXmXzNENLit8lUJkkw/Pd16sHGHZ+7matGr8d7wRP2iNmZjbfBESVy3SIbLGtKUo0oL awlZXf0E14Uu5MI8P1i0MryVBLPFo/ua9s2MGFH+8e5H9PJUlZkeEuPegBMoInBAU312 URGLUH5XmAUfdu7LcXFBv1hhpkSf7eFGODf5rDng8IF47IzKurRZiw095xJXlGZqtjqo a8YQ== 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:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=2SzZZZA7FbaiZwiGkzw/hCE5wsQuL1zGjyQqmdtFjJ8=; b=qXE9oK4wYKCrs7azlgaFfRAEF5pHdbOi5R4XV3Mt6eyVWjAVJp+73vYy+KbBE3yFiZ OECtbbSZsQOsaQri2r5CssQmLjmNGONQskHiMXGYIpA+6mNM9GFK8lmuvEvWENA/C11W AAXFdA1JmUIXN2qzyJ4ybKSlISECQSRV13dzXsvPI7Hh1+AfiwpRW2oBC39a5ZDAYZQu KqFcpSzI77z85Ln+U2UQCz7j8rEd3WdeYQ/99qlTkKxxR0aG/Y5dISpO37oJxQnGjl/u eXgVQMiEMzkXRvJyzya6GkP/coLlSW+5Tm90hNYucwmgfWFUogLY8/0sK2qBm3TPmemV xcBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=OphMlpQ3; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 61si724339wrp.474.2018.02.11.06.38.22; Sun, 11 Feb 2018 06:38:22 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=OphMlpQ3; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 833BA689A55; Sun, 11 Feb 2018 16:37:55 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf0-f51.google.com (mail-lf0-f51.google.com [209.85.215.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DCE9D689A40 for ; Sun, 11 Feb 2018 16:37:48 +0200 (EET) Received: by mail-lf0-f51.google.com with SMTP id x196so17154085lfd.12 for ; Sun, 11 Feb 2018 06:37:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=Es26OqGvltqcen4FQbBd/f9jExsRJzQ6/WYojPLBPgU=; b=OphMlpQ3CpcEYALZRt1UGzWSd95A8lndLXsO7jObnfKtadCwRfzI4QnFpVpmMkZjet PaA5VQLlo2HKs4atw7xH0zyUYjvpslHn55PT8TMCt8ic+H5IrRMKtz7iPGb/YgYr/IjR NznIGjxxUe+qKhGAMPunGA7YYCVLhC+Xvc07EaPdlsITC7j0HXWnZFx7psPGqVn0pkx7 EieEpVe7GjW4XMp+lb89EL/7uGq0LGrrsBPWUPppLnFL46iDexvEqto6dgQrKl1dvuFQ RAyl7B0Vbz1HGiwoiLxw5fa3bzLteBPtw2qUdKs43tnfA2xsvC9VuI30lK8vn8/92Z6D hNGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Es26OqGvltqcen4FQbBd/f9jExsRJzQ6/WYojPLBPgU=; b=nR6Qf948hhYmHdpNaMChR9mlbabvEl97sKkHkU19IesAnVmouvU++tL83f7F2gf756 R2fAG7owbO+RkWgXj/n3tGynLhh9uetM67uLaAIarvoemCI7cbwCkRZLlYagNfI3Vdpk Z9K/mr65qIzEke/zbkVB/Wk/LycGU4Zl20/QeAFy8ti8ilkTMxmidcZzMYXpGH3nbZls 74koMxVO5W3nc2XXiaDNjtpTCdSRniOXChQwcihFac2lPWTeDu6fmh7UDHuDvoLAZXK/ J8vrFmEnKdkJEAIxHHHF+MFLDUlU8zyFTm5sRz2RY1o1axApn9YWYO0kClTzutn/zi1n /zfA== X-Gm-Message-State: APf1xPA5EeQnIPgKpl73i06a3FfXR+IwUcHlEGesnmgAmb6Vk2sTlPOG gXJdLcnhISK88PWyGq4NfT49gM5n X-Received: by 10.46.75.1 with SMTP id y1mr5602190lja.33.1518359878477; Sun, 11 Feb 2018 06:37:58 -0800 (PST) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id f3sm1213107ljc.19.2018.02.11.06.37.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 06:37:57 -0800 (PST) From: =?UTF-8?q?Jan=20Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Sun, 11 Feb 2018 16:37:51 +0200 Message-Id: <20180211143752.7851-3-jeebjp@gmail.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180211143752.7851-1-jeebjp@gmail.com> References: <20180211143752.7851-1-jeebjp@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/3] mpegvideo_parser: parse the output picture number 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" From: Masaki Tanaka Utilizes the temporal_reference field from the picture header. --- libavcodec/mpegvideo_parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index 3406346a8b..4f554b684e 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -60,6 +60,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, switch(start_code) { case PICTURE_START_CODE: if (bytes_left >= 2) { + s->output_picture_number = (buf[0] << 2) | (buf[1] >> 6); s->pict_type = (buf[1] >> 3) & 7; if (bytes_left >= 4) vbv_delay = ((buf[1] & 0x07) << 13) | (buf[2] << 5) | (buf[3] >> 3);