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 C675B41D4E for ; Fri, 18 Feb 2022 03:39:00 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4D7AA68B04C; Fri, 18 Feb 2022 05:38:58 +0200 (EET) Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D140E68AF73 for ; Fri, 18 Feb 2022 05:38:51 +0200 (EET) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zanevaniperen.com; s=key1; t=1645155530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QOX+ZHfcsaierQXZoQ/VXkUq2ck2+57Ferxjj85iDq0=; b=K0SOAkJGD/ijedurNMl3j5VLBzRDHrftpw7c+3DxHv/j0SHL2x7k3/DES9PNMqOEMQAa+I 3c4EVRn+PEuJXnHzh/UbDjoD4o2epmFmzz9E+lcuONhuTYci4Q5UmROL3REy4MCtJWiE7L vR7QAf6I0WeKfTjtx4iQW+2Ohq3smYvHvEiurP91mYC+ROT/LYySZY3DvzvYsCmIpDffQN x9W0/XKVJ/avhlmEFzf02Mij636kpjyrBStqa6s4GeU9Nuq9/SwE2AD5cE7atDNnLxeKf1 oYsu378Q9WQVknvzP1z0wD6MmzLrVP/d0Kc1McMJeKmRLBtZokYQERHJ2sgWWQ== Date: Fri, 18 Feb 2022 13:38:46 +1000 MIME-Version: 1.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220216165410.17063-1-pal@sandflow.com> <20220216165410.17063-2-pal@sandflow.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zane van Iperen In-Reply-To: <20220216165410.17063-2-pal@sandflow.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: zanevaniperen.com Subject: Re: [FFmpeg-devel] [PATCH v4 2/3] avformat/imf: fix packet pts, dts and muxing 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On 17/2/22 02:54, pal@sandflow.com wrote: > av_log(s, > AV_LOG_DEBUG, > "Switch resource on track %d: re-open context\n", > track->index); > - if (open_track_resource_context(s, &(track->resources[i])) != 0) > - return NULL; > + > + ret = open_track_resource_context(s, &(track->resources[i])); Nit: "track->resources + i" is easier to read imo > + if (ret != 0) > + return ret; > if (track->current_resource_index > 0) > avformat_close_input(&track->resources[track->current_resource_index].ctx); > track->current_resource_index = i; > } > > - return &(track->resources[track->current_resource_index]); > + *resource = &(track->resources[track->current_resource_index]); Nit: track->resources + track->current_resource_index The rest lgtm. Will apply (with nits fixed) in a few days of no objections. _______________________________________________ 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".