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 D2DE440B36 for ; Fri, 4 Feb 2022 10:56:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D66E868B23D; Fri, 4 Feb 2022 12:56:22 +0200 (EET) Received: from mail-ua1-f46.google.com (mail-ua1-f46.google.com [209.85.222.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 09C3C68B180 for ; Fri, 4 Feb 2022 12:56:17 +0200 (EET) Received: by mail-ua1-f46.google.com with SMTP id 60so10194678uae.1 for ; Fri, 04 Feb 2022 02:56:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language :from:to:references:in-reply-to:content-transfer-encoding; bh=dTxopPSDV/qhmk0oTCRHwLQvijtpMQlDGh7MCQhm3bo=; b=ZjRsCDnU+hlybq15PZ11/+ReX2Nb9cfhZXfkOfl2v0PL8OAnVI3tsnfaSFqGdkHA+V zXlV0RgqmFoWOzoeUT+OFEDiNlF8y4gCLy5NLn4jSa7kcITRIwgsrKK0uQLn93fFr9GZ JXzJUwoYkfL7Zj6NVYxG5CvJMFUTVIFPBpZ8re0J/vVqmwEU7xesglskf4FpK0+WHbIb zb3zw/t4suz1qyN7a000x+ROMcpxYDdA6btNPDT6fjfCuindW/ZSnlV3Wm+6e+KXepzW YApERv2mjcF8lZpHPymCG5ZG0QLUzQGLHwWs2+5mvrRN3rxnjeeCiuWJZEkq4AomLTqy RcQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:from:to:references:in-reply-to :content-transfer-encoding; bh=dTxopPSDV/qhmk0oTCRHwLQvijtpMQlDGh7MCQhm3bo=; b=Xp+WJw95g1Y/plMJt3DCdf7U1l4M+8wrCR35DIjWGOAzmWYgssQfVrhNPJt0L9+7ta M2KRKiNR4VvHykzvPfjXPJ0ne9SdRtd0XdXwAM18wSkLGpRN/Y71MVkzXQOqDzfuKzCS wfK6wRSoh2Vvnr/ot3FIIQ948h0c6WTuJ+xQ5jOIXu7RrjcUQyo+03jYg4iYjCGgCSRj reJ+awmTQ3vI4n6tmEWbk1xgaFoUhifkA24w4F97vSK3EfN7qdMGTOD/gptDSR/XrhJb +YIJGqdJrsKVnuE5gfY1ce13VXfgq8nDgwROXFTj+ArlYeQl5aYJVT5ZAgN9UOlOI2oL Lizw== X-Gm-Message-State: AOAM530g0cCmPv2Q0nxpFToi9HLF0oWgetAptsia7Q7uWiZIZO/bZR/Y oThrC1mykB32skFBNG6V8Md5+ODB5DU9cQ== X-Google-Smtp-Source: ABdhPJzjJSyvsfhMUbhCazmNneaRhNk5rR4XiLu+SKtJovq4wuKcBxxi8CwNlvecCjJupxRrlIhhGw== X-Received: by 2002:a67:df83:: with SMTP id x3mr631041vsk.86.1643972175101; Fri, 04 Feb 2022 02:56:15 -0800 (PST) Received: from [192.168.0.10] ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id q69sm387740vka.21.2022.02.04.02.56.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Feb 2022 02:56:14 -0800 (PST) Message-ID: Date: Fri, 4 Feb 2022 07:56:12 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Content-Language: en-US From: James Almer To: ffmpeg-devel@ffmpeg.org References: <20220201015648.2086-1-jamrial@gmail.com> In-Reply-To: <20220201015648.2086-1-jamrial@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH 1/4] avformat/demux: don't propagate unsupported skip samples packet side data values 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 1/31/2022 10:56 PM, James Almer wrote: > Should fix ticket #9622 > > Signed-off-by: James Almer > --- > I'm not sure if this is ok or not. The AV_PKT_DATA_SKIP_SAMPLES doxy states > the skip samples value is a little endian uint32 value, so even if the mov > demuxer wrote a truncated int64_t value in sti->skip_samples (which, being an > int, can be negative), it would still be "valid" when written into the packet > as side data. > > Chromium's fix is https://chromium-review.googlesource.com/c/chromium/src/+/3424556 > where you can see they have been reading the skip samples value from > AV_PKT_DATA_SKIP_SAMPLES as an int. > > libavformat/demux.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavformat/demux.c b/libavformat/demux.c > index f895f0ba85..09d539af68 100644 > --- a/libavformat/demux.c > +++ b/libavformat/demux.c > @@ -1354,6 +1354,7 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) > } > if (sti->start_skip_samples && (pkt->pts == 0 || pkt->pts == RELATIVE_TS_BASE)) > sti->skip_samples = sti->start_skip_samples; > + sti->skip_samples = FFMAX(0, sti->skip_samples); > if (sti->skip_samples || discard_padding) { > uint8_t *p = av_packet_new_side_data(pkt, AV_PKT_DATA_SKIP_SAMPLES, 10); > if (p) { Will apply patchset. _______________________________________________ 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".