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 94A344464E for ; Wed, 21 Jun 2023 16:31:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 806FC68C051; Wed, 21 Jun 2023 19:31:47 +0300 (EEST) Received: from mail-oa1-f51.google.com (mail-oa1-f51.google.com [209.85.160.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 60B2F68BF38 for ; Wed, 21 Jun 2023 19:31:41 +0300 (EEST) Received: by mail-oa1-f51.google.com with SMTP id 586e51a60fabf-19674cab442so5395630fac.3 for ; Wed, 21 Jun 2023 09:31:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687365099; x=1689957099; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id:from:to:cc :subject:date:message-id:reply-to; bh=hF7udXqCad311c3e9WCREXJKf1GdZnpkAPXThvF7pyA=; b=Jivf9LHIHqM7tq5V+hOVgRXN+hNq+jmXtZH6U+DB7uNAL8KxmEhVNcER0yJavuJ6jz zQFb/A/YKOcEA/YlLk/+O4AIXt9TWpHAxbt88GnXHy2fPyA0hYWKUj9IR/iYJB8oLoiN 1fDjvn1YZR2uG98hkn5d5kRGsvu9dsE4viJgC6iBjCCQW7b/oPHEARQHveLsEzDGjOhT W20S1gqwMBL8czvg16zlp0WHoMIbgxtsvMFMWBYrNLuacyZkHIfYnNndrl3EpYvOGkdw UbWqNx1wEsTmiSmhDnvxrIP8bnVrgtfGOJxrq/PKTuFeYEVEhkxQgNE8nsh7sQ9licXT +Bzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687365099; x=1689957099; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hF7udXqCad311c3e9WCREXJKf1GdZnpkAPXThvF7pyA=; b=VKAhcWKoMxiAHX7FzRzjDkYhh5btMCCN6LZ7eZ7yM39TvZobPq90sXnX2iwIpK5See xl7Ga/9LKLbdnOh3toPTcB/GhyksIRDDGDuGY0T/KAbD9cD+G4LSIyKMZoR1qXI4jVMW sPQfE50QGTVUC1ImpRStDvbI7rJXNHp+4nzHjDif1xyK4A8e95Tu4PLg0wUCvTEreS3u SgWOwA+itos77WlBdqM/Ool2et7wlbQHCtEPo89xVNRhUvBNzSebennwNg8j+mjf0Z08 7uPLru8Wm7ebo2mu1WUBjKq1u+IFj73IZJLsOE8jxZ7wNIiSK9mL7GuU9MlXk9z5qKiR KZNg== X-Gm-Message-State: AC+VfDwm9rRG9a7IvHM6TmCCIHez1MquBagzG3vhfrH/xHigOxSpGGHo jMCxBVKNKANiESUcR7qQTow1iFA0I1o= X-Google-Smtp-Source: ACHHUZ47OhUEesImzGwlB+TplULP7Api5Eie/cTketOMXYVJ/2WBFuo1+Tt2kbdaowvSJm5guSWdTQ== X-Received: by 2002:a05:6870:b285:b0:1a9:71c3:b7c2 with SMTP id c5-20020a056870b28500b001a971c3b7c2mr7925392oao.50.1687365099170; Wed, 21 Jun 2023 09:31:39 -0700 (PDT) Received: from [192.168.0.12] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id u19-20020a056870441300b0019f7184d7e0sm2997221oah.21.2023.06.21.09.31.38 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Jun 2023 09:31:38 -0700 (PDT) Message-ID: <606a89ea-348d-c0af-b7b3-bdd0b16dfc73@gmail.com> Date: Wed, 21 Jun 2023 13:31:51 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 From: James Almer To: ffmpeg-devel@ffmpeg.org References: <20230620144042.9629-1-jamrial@gmail.com> Content-Language: en-US In-Reply-To: <20230620144042.9629-1-jamrial@gmail.com> Subject: Re: [FFmpeg-devel] [PATCH 1/9] avformat/evcdec: ensure there are enough bytes to seekback 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 6/20/2023 11:40 AM, James Almer wrote: > Signed-off-by: James Almer > --- > libavformat/evcdec.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/libavformat/evcdec.c b/libavformat/evcdec.c > index 890babd3cb..9c4969e78f 100644 > --- a/libavformat/evcdec.c > +++ b/libavformat/evcdec.c > @@ -30,6 +30,7 @@ > > #include "rawdec.h" > #include "avformat.h" > +#include "avio_internal.h" > #include "internal.h" > > > @@ -192,8 +193,12 @@ static int evc_read_packet(AVFormatContext *s, AVPacket *pkt) > } > > while(!au_end_found) { > - > uint8_t buf[EVC_NALU_LENGTH_PREFIX_SIZE]; > + > + ret = ffio_ensure_seekback(s->pb, EVC_NALU_LENGTH_PREFIX_SIZE); > + if (ret < 0) > + return ret; > + > ret = avio_read(s->pb, (unsigned char *)&buf, EVC_NALU_LENGTH_PREFIX_SIZE); > if (ret < 0) { > av_packet_unref(pkt); Will apply set. _______________________________________________ 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".