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 B701140817 for ; Sun, 31 Jul 2022 20:38:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BA01D68B994; Sun, 31 Jul 2022 23:38:31 +0300 (EEST) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3AB6468B8D1 for ; Sun, 31 Jul 2022 23:38:25 +0300 (EEST) Received: by mail-pj1-f51.google.com with SMTP id s5-20020a17090a13c500b001f4da9ffe5fso3077968pjf.5 for ; Sun, 31 Jul 2022 13:38:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FwKvxwrA3NOseZ5HpVCRZiIp+AR0Ge1Jb7rvqD7EFTM=; b=kXUeIEXOjRE684hUfNpDPNqpSRa9BKOZyTFQUD6/2ORrZFOGmxAwOLzNfdU/XhJGtR 7Ci9v3o4dU1uvbNcvXj5QD6JXbYOhxn8XNHL0DIxUPg/68CUR1yDWliTKWw1fPTfqp7+ /1L9SkeRaX2Go0JGRkCuosm8QGyt03/DRhLkoWNFst5m10+dTbKFGW+3atjgKg5ZfyYh HFnPnbvAhqrC85s3sHSn+GYUdODwBHXI+iGbrR2+3oYH1OrWV/nIU9V3zx75K8rSaCZH 60s1Jyi9+wII6bBbb+p3zHDWTK7YA7HpZPKjpIIa5vuEhUL1JKJe+W982Czo8w7WIu46 FRHA== X-Gm-Message-State: ACgBeo2NymBm5UfYzfg9XfU8x2y2v5ruKpNEyOuM/rCNvPNo4CipXxU7 Fj2r1CjyrqeNe4baCKm995Wf2oWNVPA= X-Google-Smtp-Source: AA6agR7N2eCoVhbj8Vh/Jj7d8VRWdsIr+Idjvk0SgDmRYBlvlAtH9OD3MhVSvq5qPL8qO3IPCnwmfw== X-Received: by 2002:a17:902:c713:b0:16e:cbe3:29da with SMTP id p19-20020a170902c71300b0016ecbe329damr8324191plp.61.1659299903006; Sun, 31 Jul 2022 13:38:23 -0700 (PDT) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id o24-20020a170902779800b0016bd8f66ca0sm7793167pll.162.2022.07.31.13.38.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jul 2022 13:38:22 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Sun, 31 Jul 2022 13:38:05 -0700 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Sun, 31 Jul 2022 13:37:58 -0700 Message-Id: <20220731203758.15667-2-pal@sandflow.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220731203758.15667-1-pal@sandflow.com> References: <20220731203758.15667-1-pal@sandflow.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 2/2] 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 Cc: Pierre-Anthony Lemieux 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: 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. --- libavformat/imfdec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c index 71dfb26958..4cd6a56a09 100644 --- a/libavformat/imfdec.c +++ b/libavformat/imfdec.c @@ -579,12 +579,15 @@ static int set_context_streams_from_tracks(AVFormatContext *s) av_log(s, AV_LOG_ERROR, "Could not create stream\n"); return AVERROR(ENOMEM); } - asset_stream->id = i; - ret = avcodec_parameters_copy(asset_stream->codecpar, first_resource_stream->codecpar); + + ret = ff_stream_params_copy(asset_stream, first_resource_stream); if (ret < 0) { av_log(s, AV_LOG_ERROR, "Could not copy stream parameters\n"); return ret; } + + asset_stream->id = i; + asset_stream->nb_frames = 0; avpriv_set_pts_info(asset_stream, first_resource_stream->pts_wrap_bits, first_resource_stream->time_base.num, -- 2.25.1 _______________________________________________ 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".