From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id AC95B43963 for ; Sun, 3 Jul 2022 18:40:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2833D68B97D; Sun, 3 Jul 2022 21:40:05 +0300 (EEST) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A284568B8C0 for ; Sun, 3 Jul 2022 21:39:58 +0300 (EEST) Received: by mail-pg1-f178.google.com with SMTP id r22so132445pgr.2 for ; Sun, 03 Jul 2022 11:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandflow-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=yjNCXj1DuNfmyxaEbMs2nwxJK3M6zg9mzd2cuCyuq8Q=; b=5m7GyoIkE9hWH2KVBqvvBYcWPOV029jpmvRp0oYqoTsEaFxy90rHMG6YGVZCD13HEQ h/USAjBZKUaq7PRCh5D1rMksqa2L5KWZaemFsVDeEKwct6+tftU5b4n976lqv/Tc98B9 W+SLYi2Lareiz4mYvoRIuBIqUUWYmRVuRUKQUyAXbng31AcVxcANnCXaB/i7sexxrU1D oZ53/dxopP3Actg5/HdxFQSbCJIGZHvvYTximgHvLX2FxKBc9V1wnZfB1675fEaM9v9h JOaocUjpGiW9AzTMvd9RCRRIkX+1p94nAw3V5Lxaa1v5CfIuqpW65b+9rz0RthuEC3qz tNLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=yjNCXj1DuNfmyxaEbMs2nwxJK3M6zg9mzd2cuCyuq8Q=; b=iIYRgQgZm2bsXKckjHW/XUvBzcHml24yCDiqa1fHtfEqUvbkPLI0lLZ5tzfpY84wo7 Hy9FfyTVA/pQgurLMMf4yTD8aqgmv/6+l3deWNCVpN2Rve/ufzRNocaa6mrW6/BXqTOB f4DrHxds/qWSZ6mL4TixzurjHuG6gzQzLbGUu6R9YIab7fpy0KXN8y5bK3J2bkIGabEe euxANyPoiTs7grA4BjM9t14LyJOllAXoUS6recwqwxd9dBGl4E3R031j4IVV1t3auHGT gHpSZkCpTWQoMUB1zO7wiNyvJUmFkRWY6I0lHxdVwzH39sMa6STl99V36mwfooNsZq6U kc1A== X-Gm-Message-State: AJIora+wp2w7HFxrQqUxtVygkKNGuyLeQzBX5HU8je/HBycmpEKAmtw9 +xuWpvaTAEfCjV0hv9jjL/aE33MytleAzQ== X-Google-Smtp-Source: AGRyM1vV4yiSrPn9H/Ltq1fkt2xDP4SIv2mht2FdQcekn/rn2tNs8onIXR9NWLRWYMZ73hWx1tW/Bw== X-Received: by 2002:a05:6a00:1a4a:b0:518:bbd5:3c1d with SMTP id h10-20020a056a001a4a00b00518bbd53c1dmr31747322pfv.64.1656873596125; Sun, 03 Jul 2022 11:39:56 -0700 (PDT) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com. [209.85.214.177]) by smtp.gmail.com with ESMTPSA id l2-20020a17090a070200b001ef7fd7954esm1638454pjl.20.2022.07.03.11.39.55 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 03 Jul 2022 11:39:55 -0700 (PDT) Received: by mail-pl1-f177.google.com with SMTP id m2so6773991plx.3 for ; Sun, 03 Jul 2022 11:39:55 -0700 (PDT) X-Received: by 2002:a17:902:d2c5:b0:16a:5204:304f with SMTP id n5-20020a170902d2c500b0016a5204304fmr31010350plc.98.1656873594625; Sun, 03 Jul 2022 11:39:54 -0700 (PDT) MIME-Version: 1.0 References: <20220703181525.6488-1-pal@sandflow.com> In-Reply-To: From: Pierre-Anthony Lemieux Date: Sun, 3 Jul 2022 11:39:41 -0700 X-Gmail-Original-Message-ID: Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH v1] avformat/imfdec: preserve stream information X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sun, Jul 3, 2022 at 11:28 AM Andreas Rheinhardt wrote: > > pal@sandflow.com: > > From: Pierre-Anthony Lemieux > > > > As discussed at https://trac.ffmpeg.org/ticket/9818, the IMF demuxer does not > > currently preserve stream information such as language in the case of audio > > streams. This patch is modeled on copy_stream_props() at avformat/concatdec.c. > > > > --- > > libavformat/imfdec.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c > > index 71dfb26958..7aa66a06bf 100644 > > --- a/libavformat/imfdec.c > > +++ b/libavformat/imfdec.c > > @@ -580,11 +580,16 @@ static int set_context_streams_from_tracks(AVFormatContext *s) > > return AVERROR(ENOMEM); > > } > > asset_stream->id = i; > > + asset_stream->r_frame_rate = first_resource_stream->r_frame_rate; > > + asset_stream->avg_frame_rate = first_resource_stream->avg_frame_rate; > > + asset_stream->sample_aspect_ratio = first_resource_stream->sample_aspect_ratio; > > ret = avcodec_parameters_copy(asset_stream->codecpar, first_resource_stream->codecpar); > > if (ret < 0) { > > av_log(s, AV_LOG_ERROR, "Could not copy stream parameters\n"); > > return ret; > > } > > + av_dict_copy(&asset_stream->metadata, first_resource_stream->metadata, 0); > > + ff_stream_side_data_copy(asset_stream, first_resource_stream); > > avpriv_set_pts_info(asset_stream, > > first_resource_stream->pts_wrap_bits, > > first_resource_stream->time_base.num, > > Seems to me like one should use ff_stream_encode_params_copy here. Of > course, it would have to be renamed and moved if used in a demuxer. Would copy_stream_props() in concatdec.c need to be refactored as well? Note that, in the case of avformat/imfdec.c, AVStream::id is not copied across, so ff_stream_encode_params_copy() would need to be followed by asset_stream->id = i; > > - Andreas > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".