Hi, On Mon, Mar 25, 2019 at 12:42 PM James Almer <jamr...@gmail.com> wrote:
> On 3/25/2019 12:29 PM, James Almer wrote: > > + ret = ff_cbs_read_packet(s->cbc, td, s->buffer_pkt); > > + if (ret < 0) { > > + av_log(ctx, AV_LOG_ERROR, "Failed to parse temporal > unit.\n"); > > + return ret; > > > + if (split) { > > + AV1RawFrameHeader *frame = NULL; > > + int cur_frame_type = -1, size = 0; > > + > > + for (i = s->cur_frame_idx; i < td->nb_units; i++) { > > + CodedBitstreamUnit *unit = &td->units[i]; > > + > > + size += unit->data_size; > > + if (unit->type == AV1_OBU_FRAME) { > > + AV1RawOBU *obu = unit->content; > > + > > + if (frame) { > > + ret = AVERROR_INVALIDDATA; > > + goto fail; > > > + } else if (unit->type == AV1_OBU_FRAME_HEADER) { > > + AV1RawOBU *obu = unit->content; > > + > > + if (frame) { > > + ret = AVERROR_INVALIDDATA; > > + goto fail; > > > + } else if (unit->type == AV1_OBU_TILE_GROUP) { > > + AV1RawOBU *obu = unit->content; > > + AV1RawTileGroup *group = &obu->obu.tile_group; > > + > > + if (!frame || cur_frame_type != AV1_OBU_FRAME_HEADER) { > > + ret = AVERROR_INVALIDDATA; > > + goto fail; > > I'm not sure if we should abort and discard the packet in these cases, > or just pass it through. > > In all these the Temporal Unit is invalid in some form (Orphaned Tile > Group OBUs, Frame Headers showing up when the Tile Groups from a > previous Frame Header were expected, etc), but maybe it should be left > to the decoder to decide what to do with them. Is cur_frame_type the previous OBU's type? Is something like framehdr-highdynamicrangframedata-tiledata valid? Ronald _______________________________________________ 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".