On Tue, Aug 13, 2019 at 2:49 PM Nicolas George <geo...@nsup.org> wrote:
> > + info->blocks_offset = offsetof(AVEncodeInfoFrame, blocks); > > You can use sizeof(AVEncodeInfoFrame) and dispense with the blocks final > array entirely. > The array is there so that the structure isn't opaque, it should be accessed with the function. > > + if (!info || idx >= info->nb_blocks || idx < 0) > > + return NULL; > > How valid is it for applications to call with idx outside the range? They shouldn't but I figure it's better to return NULL than to get undefined behaviour. _______________________________________________ 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".