From patchwork Wed Aug 31 11:35:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: erkki.seppala.ext@nokia.com X-Patchwork-Id: 363 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp328300vsd; Wed, 31 Aug 2016 04:38:07 -0700 (PDT) X-Received: by 10.194.53.234 with SMTP id e10mr8294557wjp.85.1472643481953; Wed, 31 Aug 2016 04:38:01 -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 i130si10110423wme.120.2016.08.31.04.38.01; Wed, 31 Aug 2016 04:38:01 -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=@nokia.onmicrosoft.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=NONE dis=NONE) header.from=nokia.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 083FD689B0D; Wed, 31 Aug 2016 14:36:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20093.outbound.protection.outlook.com [40.107.2.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D233F689A53 for ; Wed, 31 Aug 2016 14:36:09 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FrlogD8gFQyfDlYkuMisXdD+nTK+Sx1cEnkbS+bAxOo=; b=cG5v/jishbcNLhiu1ex7Ut9W5K73S+hJebUvc+9kSVhLTboYTUeg1I15oUv9QzF5OdU68hVXvjY4vu1CkkTo/Pzm2TP4ts/lIdZegEUudJ+W1w6RXM4CR8YNa+xc6hEckpZctwvnTfBF3R8/WdUfATrJI58x1eczUJhOWxr9WtU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=erkki.seppala.ext@nokia.com; Received: from erkkise-laptop.vincit.intranet (131.228.2.27) by VI1PR0701MB2544.eurprd07.prod.outlook.com (10.168.139.145) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9; Wed, 31 Aug 2016 11:36:09 +0000 Received: by erkkise-laptop.vincit.intranet (Postfix, from userid 1000) id D9BA34CB94E; Wed, 31 Aug 2016 14:36:01 +0300 (EEST) From: =?UTF-8?q?Erkki=20Sepp=C3=A4l=C3=A4?= To: Date: Wed, 31 Aug 2016 14:35:51 +0300 Message-ID: <1472643361-10118-9-git-send-email-erkki.seppala.ext@nokia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472643361-10118-1-git-send-email-erkki.seppala.ext@nokia.com> References: <1471943019-14136-1-git-send-email-erkki.seppala.ext@nokia.com> MIME-Version: 1.0 X-Originating-IP: [131.228.2.27] X-ClientProxiedBy: HE1PR02CA0072.eurprd02.prod.outlook.com (10.163.170.40) To VI1PR0701MB2544.eurprd07.prod.outlook.com (10.168.139.145) X-MS-Office365-Filtering-Correlation-Id: 0f9aa85b-dd90-41d6-5fe1-08d3d19300ad X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2544; 2:mwn/pGn+e5yuzw0sRNXFdVjFW0nfp9mtk91gsNXw3TLphQ7BmRn9Kb38tTZnvlWp+BhFoHcZhpmFJlGlBUIwrCc9tssBuUr9L/5L4xze+48rU9FTpNVlS+pvUL0AOhX6kXNfWZB48MJpWIBoNYvXYp9mDY73efA2K1GF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Npb1+HyQj6yzyVR9fKTAanyTs2B0oovb9+npc7nLOcGjguOXVL6mQJ9j+fLdUvRd0SvMX6ZfxAr+nDAw9KFJ+tbuBYmq8PN8Rz/8kVVAIXVFDVRmbMjAqwueFmSFAjCWaUI/AuNfloi7UINM68TWRf+OK20EPDpHDoC7ch0x6LzjyN9Yg8LLRdkjoW/BHS6ek3WcDxzXuCcobcKxWX23yDfWKQPzBSHscfKy0a1u0mFyrsyGyz0TA1OzRGJERLkx0sLdLTKSstA0Vp/nxTnUNWsgv4MOMFaQbzsRNR4VhBZmScWWduedopdOQRkIxI2MjJ+kaMp/U09WBZ10wF+jVVnt6lelcSDEU/BPNGv0d4xSmz42RG5p/jH X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(82608151540597); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:VI1PR0701MB2544; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0701MB2544; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0701MB2544; 4:AP6rZp4/sFKrfzIP/8xQshOKlTNOfMrqjQgIC5t0zVXOr6/VHRtRDpUcEXqJONyZmVlMU3GbopLkcaGtYHXLVCL1UhiKAr0OhR6eFleBqRmH2wXogtvxRf4EQes9uRg3CHO5d+RzSChc/XHMnOODkXsYP8I1xfZb0q3COJl8UErMRkto3RPX6oH+tLuaSipa6eAxj+jY/XLBNa7K77tMpDgoLHS1MVs4qTz6mfuiIatBZ+7IkwTNYvaKhihJcSyJ/fkLoRTqUK2x6uvyhr0Bfv77Uv1g5F3/3Ik/QhEhATH8YPd4Td3Q8nyQfZzVZ3NEdqDnIH/OBhHmOjVwlwdFDMVCaw09tu2O8ftTEMh5THrM/++qSBFeRbM2De/H7VmcKJzYfX6LGcIN19hgCzEiaYtMiVuzP288wEQIl73WF8A0NxsUee3jLgD4R4+PiAtF0uTx6Uz0r2SyWazDL/aa6Q== X-Forefront-PRVS: 00514A2FE6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(229853001)(2351001)(5820100001)(50986999)(76176999)(4001430100002)(33646002)(97736004)(110136002)(42186005)(189998001)(50466002)(101416001)(2950100001)(36756003)(107886002)(52956003)(68736007)(90966002)(92566002)(86362001)(81166006)(81156014)(305945005)(46386002)(23676002)(7846002)(19580395003)(19580405001)(8676002)(586003)(7736002)(45336002)(6116002)(66066001)(47776003)(3846002)(122856001)(450100001)(4326007)(2906002)(105586002)(2870700001)(50226002)(106356001)(5660300001); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0701MB2544; H:erkkise-laptop.vincit.intranet; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: nokia.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjA3MDFNQjI1NDQ7MjM6ejFwM0hjK2hPZkdzcXBtMkhUODhXdFJx?= =?utf-8?B?b3J5UHNLQ3c5WFBGcU9JZE9uTHUyV0MrNU1sVlZabDBQTWpPS3YweWNOeWdD?= =?utf-8?B?UFJoOXNXR3dwUjdxTUtpcjA0ZjgrNEVpU0dvZ0dRQ05NOG5oOVpUcDQwNGNX?= =?utf-8?B?YTV6YXhEei9wNnpwcVhjaXVQenFpSGNxb3c3dlJOcGwvNlNYYmQrRVhzU2dZ?= =?utf-8?B?YkRUbkZSRXR4Um5xMVB4eVZsaFJqd1MrMW5zbFJQWGdNTlN2Vnd4TXdzUWpx?= =?utf-8?B?cjhZZVZzK0pTVmNUM2pTNUxiWTYrd2kwK1NrVnZFYldrQWN5Z2ZKSXNEZ3BO?= =?utf-8?B?N3pxSnZUWXIzT3A3QmlqOUl6K2ZyV1FHYWNLZWZmWlEzMnlid1kwR3gyZE0v?= =?utf-8?B?WmJ0Ukt4VW8xWGdxd0tKaGllQmtEcFlDOVVzWjF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3xP/EWTSTB4tVdrh8qGdErUkHymfjU0HBxF95MuE=; 7:1023odnantOBZi92MNKfKZvK57LxcO1xQ27uVIX6dtuTK51H/iCB+oeB4pXk9sq5Zy4k4dogKYNMyM9/eehkSgn1qq6jL54EZOIh1BszKYD2DRwNgI33nVNdYyod8PU3F0klET69hlduYV7PGXB7wtxr+lTRTF8yk5HNetOPTjeZ8k2ik2/NO7GUPpYnvooMv7orqzIuWYjRWI8x7ga/QBNtWx3iOYGeICODwzd/NDhO/9aGAqDMmtcpC3Y+jBNk SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2016 11:36:09.0671 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0701MB2544 Subject: [FFmpeg-devel] [PATCH v2 08/18] avcodec/utils: do_decode now supports AVMEDIA_TYPE_DATA 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: =?UTF-8?q?Erkki=20Sepp=C3=A4l=C3=A4?= , OZOPlayer Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This allows using avcodec_send_packet with data frames (ie. timed metadata) Signed-off-by: Erkki Seppälä Signed-off-by: OZOPlayer --- libavcodec/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 138125a..8b55464 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2737,6 +2737,10 @@ static int do_decode(AVCodecContext *avctx, AVPacket *pkt) } else if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) { ret = avcodec_decode_audio4(avctx, avctx->internal->buffer_frame, &got_frame, pkt); + } else if (avctx->codec_type == AVMEDIA_TYPE_DATA) { + ret = avctx->codec->decode(avctx, avctx->internal->buffer_frame, &got_frame, pkt); + if (ret == 0 && got_frame) + ret = pkt->size; } else { ret = AVERROR(EINVAL); }