On Saturday, 1 May 2021 1:27:44 AM AEST Timo Rothenpieler wrote: > On 30.04.2021 13:34, Brad Hards wrote: > > + num_unregistered_sei = av_frame_num_side_data(frame, > > AV_FRAME_DATA_SEI_UNREGISTERED); + for (int i = 0; i < > > num_unregistered_sei; i++) { > > redefines i from above. Not sure if that's even valid. Will fix.
> > + sd = av_frame_get_side_data_n(frame, > > AV_FRAME_DATA_SEI_UNREGISTERED, i); + if (sd) { > > + sei_data[sei_count].payloadSize = sd->size; > > + sei_data[sei_count].payloadType = > > SEI_TYPE_USER_DATA_UNREGISTERED; + > > sei_data[sei_count].payload = av_memdup(sd->data, sd->size); + > > sei_count ++; > > + if (sei_count >= 8) { > > + break; > > + } > > + } > > + } > > I'm not at all a fan of writing an arbitrary amount of stuff into a > small fixed size array. I don't understand this comment. The existing code defines a fixed size array, and I don't want to change it because I couldn't find an authoritative source as to why that size or approach. I assume it could be a hardware limitation on at least some versions. So I've tried to follow the existing approach, and ensure that the loop never exceeds the available space by tracking the count. Am I missing something? Brad _______________________________________________ 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".