On Tue, Jan 26, 2021 at 2:35 AM James Almer <jamr...@gmail.com> wrote:
> On 1/25/2021 2:12 PM, James Almer wrote: > > On 1/25/2021 11:15 AM, Nuo Mi wrote: > >> +static int FUNC(ref_pic_list_struct)(CodedBitstreamContext *ctx, > >> RWContext *rw, > >> + H266RefPicListStruct *current, > >> + uint8_t list_idx, uint8_t > rpls_idx, > >> + const H266RawSPS *sps) > >> +{ > >> + CodedBitstreamH266Context *h266 = ctx->priv_data; > >> + int err, i, j, general_layer_idx = -1, num_direct_ref_layers = 0; > >> + const H266RawVPS *vps = h266->vps[sps->sps_video_parameter_set_id]; > >> + > >> + if (!vps) { > >> + av_log(ctx->log_ctx, AV_LOG_ERROR, > >> + "VPS id %d not available.\n", > >> sps->sps_video_parameter_set_id); > >> + return AVERROR_INVALIDDATA; > > > > Wont this break all the samples that lack a VPS? > > > > (I thought for that matter that all those samples having this field but > > then no VPS at all was odd). > > Right, i see now that vps_video_parameter_set_id in a VPS is meant to > never be 0, so apparently a VPS with id 0 and default values is implicit > to always exist while not being coded in the bitstream, and that's what > these SPS with sps_video_parameter_set_id == 0 reference. > > I don't know if allocating it when parsing the first SPS is the best > idea, but i can't think if a better alternative right now. > Yes. You are right. > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@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-requ...@ffmpeg.org with subject "unsubscribe".