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 62F2540F89 for ; Tue, 12 Jul 2022 22:34:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 50DD568B863; Wed, 13 Jul 2022 01:34:40 +0300 (EEST) Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1712268B7F0 for ; Wed, 13 Jul 2022 01:34:34 +0300 (EEST) Received: by mail-pj1-f50.google.com with SMTP id fz10so9442035pjb.2 for ; Tue, 12 Jul 2022 15:34:34 -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=eX5WBQ1QtQB6VHFVEProLPO9CBCI9UurShpZdWueFmT0kkMBw18DayZTqvJp0Hpn08 SEetqbZctQjUn/c+nI5vDOdhmMWd6+JBM3godYFEOef417tRtidxY+kG3/YB4KWv3kWh /gQh9+zcbtziLksZetfPh0enFj3k/b6Cnru4O07M5UQ8gzvWPDMvRrsQGYqSDppYDJfh vjMeRABPwrKl32drRW/MG23iVeNhPS0y/XFzsa3Lz9o1b++JolFWOdSVZ2E6tzLdwCmT ZvQOPninyh/wK+i8AT2pevzAmUsvX80F+8mlbl/UxeN/5TChCrzjLazmM47+xXOI6y5F rs0w== X-Gm-Message-State: AJIora+s+98GX8D02aa8dN5RC+dyIy4V4k2aIBOJBB/cUaTtYFXfMwAi zoiagPBPSFlT+35CEnHJyS9McTQpY4Mgng== X-Google-Smtp-Source: AGRyM1shEoN4gTAskWaxZrHYj3tA2aenB7xGF+IIUZXLX8W4TvAbMUlZ1dNONn0RV41qcstoE48XdQ== X-Received: by 2002:a17:902:ed02:b0:16b:d5f6:2c17 with SMTP id b2-20020a170902ed0200b0016bd5f62c17mr430664pld.85.1657665272060; Tue, 12 Jul 2022 15:34:32 -0700 (PDT) Received: from localhost (76-14-89-2.sf-cable.astound.net. [76.14.89.2]) by smtp.gmail.com with ESMTPSA id c2-20020a170902d48200b0016bc947c5b7sm7379639plg.38.2022.07.12.15.34.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 15:34:31 -0700 (PDT) Received: by localhost (sSMTP sendmail emulation); Tue, 12 Jul 2022 15:34:25 -0700 From: pal@sandflow.com To: ffmpeg-devel@ffmpeg.org Date: Tue, 12 Jul 2022 15:34:13 -0700 Message-Id: <20220712223413.29940-2-pal@sandflow.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220712223413.29940-1-pal@sandflow.com> References: <20220712223413.29940-1-pal@sandflow.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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".