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 ED623440F2 for ; Fri, 26 Aug 2022 03:52:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A9D9468B9F8; Fri, 26 Aug 2022 06:52:36 +0300 (EEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B938C68B8B7 for ; Fri, 26 Aug 2022 06:52:30 +0300 (EEST) Received: by mail-pj1-f43.google.com with SMTP id bg22so482252pjb.2 for ; Thu, 25 Aug 2022 20:52:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sandflow-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=CIyh0DgjUQJznHsP0efkxRdJG19V3czURcLlHBqJ3F4=; b=kA5mpP4BEdyoudcd65UJmGPw9zeptXV1RIxM0+159+klmJSUEz/+oI0V6EFKWgq1em 7BLLk54HYCc358mlQ508l9qUv08HUw9zwyfwE9De+gjdA3oszWleLUfGt1iO3av+wd2e drdrWZKNt2Yk2we9iVbaQbH17yz+5FVSSLdPzvx+id/ALlXk1gRZEaf7NDB8EGF2LDI1 N672GOIMrv44+Mrqx3PxB+exgDUtbRn7FpCnb3if+z2WdPjvg5j4ixecdNMu0klardgk xHiZfeqDVsyatkE05HGgqVSeoDNecXyLSZJDl7r3AXvwjbty1SmUKi0zhLbhiPp5TUI0 Xpmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=CIyh0DgjUQJznHsP0efkxRdJG19V3czURcLlHBqJ3F4=; b=opp42qwiCY90rv+ZKSAED0GMneDWyNeHd7dCVKWgVfp3JpqDH6boCgjYFDb7/a7bDO wat4EbgHchCzxcd65GpqEbNNVDLGLO61f9f/GyxtzSbYosbzYLJxcVe4fh6flwhPSSlB S0So1ap/woROMMLvu2DUJRJqiZ4UOWgkeE1kEHVOSuF4ZChqfl2+FDbBDBOPVpU5N3Q4 +PWbV2C0u8rkMSce1g2TSrmSXuJMHNLnppk93aJVzdoi0YQmMwgVDWWWnrsQSU79XlJ6 yUf16rWGX6XHjJhLMdNveh5ZJC31a5Njslckr4nexZISMbvPvfMVcbwexaH3nekOVXIo e9Eg== X-Gm-Message-State: ACgBeo1fEtvRWm1fIeJpCYG1CrC4Ot0z3pEiQxIvws38Q7CRWJo2KRcI jGWiAOa7y0Eek91hnVv8i0M+hxiiQ7c6cQ== X-Google-Smtp-Source: AA6agR6PQ6TUAgtTLYvOHXnk4m0eVHd2GR3KdantuoEYSwXaLQI9VO0At3RRLjJv85T96CTcKGfeDQ== X-Received: by 2002:a17:902:eb90:b0:172:f986:a096 with SMTP id q16-20020a170902eb9000b00172f986a096mr1886332plg.94.1661485948393; Thu, 25 Aug 2022 20:52:28 -0700 (PDT) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com. [209.85.210.179]) by smtp.gmail.com with ESMTPSA id g3-20020a1709026b4300b0016eef326febsm374038plt.1.2022.08.25.20.52.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Aug 2022 20:52:27 -0700 (PDT) Received: by mail-pf1-f179.google.com with SMTP id z187so402745pfb.12 for ; Thu, 25 Aug 2022 20:52:26 -0700 (PDT) X-Received: by 2002:a05:6a00:4207:b0:537:ab7a:11b4 with SMTP id cd7-20020a056a00420700b00537ab7a11b4mr2052299pfb.49.1661485945641; Thu, 25 Aug 2022 20:52:25 -0700 (PDT) MIME-Version: 1.0 References: <20220826025016.29627-1-lq@chinaffmpeg.org> In-Reply-To: <20220826025016.29627-1-lq@chinaffmpeg.org> From: Pierre-Anthony Lemieux Date: Thu, 25 Aug 2022 20:52:14 -0700 X-Gmail-Original-Message-ID: Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH 1/2] avformat/imfdec: check track valid before use it 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: Steven Liu 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: Since we are protecting against the algorithm within get_next_track_with_minimum_timestamp() return NULL, should this patch also include immediately returning from imf_read_packet() if get_next_track_with_minimum_timestamp() returns NULL? On Thu, Aug 25, 2022 at 7:53 PM Steven Liu wrote: > > fix CID: 1512414 > > Signed-off-by: Steven Liu > --- > libavformat/imfdec.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c > index 5bbe7a53f8..a97dcc3b8b 100644 > --- a/libavformat/imfdec.c > +++ b/libavformat/imfdec.c > @@ -697,8 +697,9 @@ static IMFVirtualTrackPlaybackCtx *get_next_track_with_minimum_timestamp(AVForma > } > } > > - av_log(s, AV_LOG_DEBUG, "Found next track to read: %d (timestamp: %lf / %lf)\n", > - track->index, av_q2d(track->current_timestamp), av_q2d(minimum_timestamp)); > + if (track) > + av_log(s, AV_LOG_DEBUG, "Found next track to read: %d (timestamp: %lf / %lf)\n", > + track->index, av_q2d(track->current_timestamp), av_q2d(minimum_timestamp)); > return track; > } > > -- > 2.25.0 > > _______________________________________________ > 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".