From patchwork Mon Jan 13 18:54:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Gaullier X-Patchwork-Id: 17329 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 3CE5944A9E2 for ; Mon, 13 Jan 2020 20:55:11 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 25A9068B01D; Mon, 13 Jan 2020 20:55:11 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from smtp-2.arkena.net (smtp-2.arkena.net [95.81.173.75]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8834868AFA8 for ; Mon, 13 Jan 2020 20:55:03 +0200 (EET) Received: from secu2 (unknown [10.180.103.10]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-2.arkena.net (Postfix) with ESMTPSA id 47xN7W1TtMzHh9P; Mon, 13 Jan 2020 18:55:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cji.paris; s=20150421; t=1578941703; bh=lNPfldI+OrpALn0TiX/5YXXxTwU3vRVSVjwgTz63T1o=; h=From:To:Cc:Subject:Date:Message-Id; b=ku1uDH2Ukr+REKxn5pH1b/X2Vatp8wNnXcM/oG4Mxp7TzDb7GJItV3HHW1/9t/H+4 AkUE59f9UFm+FsNnwA+FGmx1+PSSHWjF0vzZGvgIIX70Vh4f/Bq7uBpodmlFvzq7h+ nzJgZTcea/F+e7DidnJ+Q4KIeK7vGMBkQLhO4UXs= Received: from arkena.com (unknown [172.16.3.159]) by secu2 (Postfix) with ESMTP id B72BC3FA6D; Mon, 13 Jan 2020 19:55:04 +0100 (CET) From: Nicolas Gaullier To: ffmpeg-devel@ffmpeg.org Date: Mon, 13 Jan 2020 19:54:56 +0100 Message-Id: <20200113185459.8908-3-nicolas.gaullier@cji.paris> X-Mailer: git-send-email 2.14.1.windows.1 In-Reply-To: <20200113185459.8908-1-nicolas.gaullier@cji.paris> References: <20200113185459.8908-1-nicolas.gaullier@cji.paris> Subject: [FFmpeg-devel] [PATCH v6 2/5] avformat/utils: Make find_stream_info get side data from codec context 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: Nicolas Gaullier MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This will allow probing input coded side data, and also forwarding them to the output. --- libavformat/utils.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/utils.c b/libavformat/utils.c index 3270d971c6..ddc36cce1c 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4135,6 +4135,9 @@ FF_ENABLE_DEPRECATION_WARNINGS ret = avcodec_parameters_from_context(st->codecpar, st->internal->avctx); if (ret < 0) goto find_stream_info_err; + ret = av_stream_add_coded_side_data(st, st->internal->avctx); + if (ret < 0) + goto find_stream_info_err; #if FF_API_LOWRES // The decoder might reduce the video size by the lowres factor. if (st->internal->avctx->lowres && orig_w) {