On 9/9/2018 7:08 PM, Mark Thompson wrote: > +static void cbs_av1_free_obu(void *unit, uint8_t *content) > +{ > + AV1RawOBU *obu = (AV1RawOBU*)content; > + > + switch (obu->header.obu_type) { > + case AV1_OBU_TILE_GROUP: > + cbs_av1_free_tile_data(&obu->tile_group.tile_data); > + break; > + case AV1_OBU_FRAME: > + cbs_av1_free_tile_data(&obu->frame.tile_group.tile_data); > + break; > + case AV1_OBU_TILE_LIST: > + cbs_av1_free_tile_data(&obu->tile_list.tile_data); > + break; > + case AV1_OBU_METADATA: > + cbs_av1_free_metadata(&obu->metadata); > + break; > + } > + > + av_freep(&obu);
Why adding a custom free function for all OBUs when only four types need it? Sounds like unnecessary overhead for all cases. IMO what cbs_h2645 does is better, using the default free function where a custom one isn't needed, then calling a custom free function directly for those that need one. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel