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 94515452F7 for ; Wed, 19 Apr 2023 13:12:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5150268BF28; Wed, 19 Apr 2023 16:12:22 +0300 (EEST) Received: from mail-oo1-f43.google.com (mail-oo1-f43.google.com [209.85.161.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C56268BE2F for ; Wed, 19 Apr 2023 16:12:15 +0300 (EEST) Received: by mail-oo1-f43.google.com with SMTP id i10-20020a4ad68a000000b0053b8aa32089so4865460oot.5 for ; Wed, 19 Apr 2023 06:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681909933; x=1684501933; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=yClDnvbCgQxI1iC6jFMR0DqFecELYfQoZ9LGotk5XOg=; b=Un268w6LCY/JFyvyk1eXCFpT3VMuexT1ST0pRlj9f4+qHJ+Igt6yQ4BSeDu4pwl0xV JTNoHL1+OOZ18+LK17NjTw4QtinMjuKSm2BngUGAP8b7YyMsyz5yweIUCK9TbkCvJHMg i8gc3JESCKktyx8pbnhQz0UPsD1d0Kqc/kGVylNtD58vXTnphdnh/WnnLJ1BhpfnY3oU rWEXWYqZcyAxMvpnRVyd0uvG4SMtQaBPa7ik2FaOxiOHPh8Weme2MwV/MT85KG0uYvUw jid7Do1v0cjyAjqSYUGavovn6b+1rw9Ho6u5haT4X7njwle3yNwF6v5eWM+bBBsD6PnB J/0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681909933; x=1684501933; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yClDnvbCgQxI1iC6jFMR0DqFecELYfQoZ9LGotk5XOg=; b=OH+5m26sypSKmEfXVXTtrKcZ3B1z9t9RK/EsHCrBdA66HhGOdbndRpC4gkT3X4AgIh Umzr0p2DAOr32CcjPV3ExoH4SQLpQtGyHhDrl7dm9bxTaml3Zo1xrMDCdH3pzcoRDoKn NxNioxyPBG4RWl+llhk8fzUN+zodmUNrWON4U6nuckzAUK2bicyxjYu1ux9lMX9TD8C8 C1/ecZKG5acitPixdHMR0jwyKg2K6kOBOcmM7ZpJxFa4gRhXr/pHSGlT5CPSW+YWM6Cd JXk4C4f/pUZg+9FtLBF+GZt0NnNbY2eZReWLuofP3ByqnSlp/0rPq4BUPVYqUN0eGnr1 JvYg== X-Gm-Message-State: AAQBX9dnWNwSFiK6iOy9s81OKchdifuK8LqyilsQRqm2v7CpkIEIYruo c74pOy4KW/+T8Rm63FLGZ8LQAnV//fw= X-Google-Smtp-Source: AKy350Y6REmK3omLwzZl1H2Nuej696faOTNv8ECNL5pwSt7u57eguevEU3p4b9FMCEjpCQt5nmdgng== X-Received: by 2002:a4a:4f8d:0:b0:542:3d6b:c2a0 with SMTP id c135-20020a4a4f8d000000b005423d6bc2a0mr8835993oob.0.1681909933379; Wed, 19 Apr 2023 06:12:13 -0700 (PDT) Received: from [192.168.0.15] (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id c126-20020a4a4f84000000b005462a25c4f9sm3987372oob.9.2023.04.19.06.12.12 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Apr 2023 06:12:12 -0700 (PDT) Message-ID: <3f225c34-f8fb-2a7e-bf29-cc5d0660dc9d@gmail.com> Date: Wed, 19 Apr 2023 10:12:16 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20230418103012.714-1-d.kozinski@samsung.com> From: James Almer In-Reply-To: <20230418103012.714-1-d.kozinski@samsung.com> Subject: Re: [FFmpeg-devel] [PATCH v20 02/10] avcodec/evc_parser: Added parser implementation for EVC format 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 4/18/2023 7:30 AM, Dawid Kozinski wrote: > static EVCParserSliceHeader *parse_slice_header(const uint8_t *bs, int bs_size, EVCParserContext *ev) > { > GetBitContext gb; > EVCParserSliceHeader *sh; > EVCParserPPS *pps; > EVCParserSPS *sps; > > int num_tiles_in_slice = 0; > int slice_pic_parameter_set_id; > > if (init_get_bits8(&gb, bs, bs_size) < 0) > return NULL; > > slice_pic_parameter_set_id = get_ue_golomb(&gb); > > if (slice_pic_parameter_set_id < 0 || slice_pic_parameter_set_id >= EVC_MAX_PPS_COUNT) > return NULL; > > sh = &ev->slice_header[slice_pic_parameter_set_id]; > pps = &ev->pps[slice_pic_parameter_set_id]; > sps = &ev->sps[slice_pic_parameter_set_id]; Missing a check to see if either of these two exist/were parsed. [...] > +static int evc_parse(AVCodecParserContext *s, AVCodecContext *avctx, > + const uint8_t **poutbuf, int *poutbuf_size, > + const uint8_t *buf, int buf_size) > +{ > + int next; > + EVCParserContext *ev = s->priv_data; > + ParseContext *pc = &ev->pc; > + > + if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) > + next = buf_size; > + else { > + next = evc_find_frame_end(s, buf, buf_size, avctx); > + if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { > + *poutbuf = NULL; > + *poutbuf_size = 0; > + return buf_size; > + } > + } > + > + parse_nal_units(s, buf, buf_size, avctx); > + > + // poutbuf contains just one Access Unit > + *poutbuf = buf; > + *poutbuf_size = buf_size; > + > + return next; > + Does the mp4 encapsulation allow the stripping of parameter sets from packets? If so, you should parse extradata here too, otherwise no sps/pps will be handled. _______________________________________________ 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".