On Wed, Sep 15, 2021 at 9:39 AM Soft Works <softwo...@hotmail.com> wrote: > > In my upcoming patchset, I have added a new struct AVSubtitleArea > which is similar to AVSubtitleRect with the difference that > > - It's not AVSubtitleRect (which can be deprecated then) > - It uses refcounted buffers for the image data > > AVFrame gets an array of AVSubtitleArea structs. The image data > is attached to AVSubtitleArea (data, buf, linesize). > > I'm not sure whether it would make sense to store the image data in > buf/data of AVFrame like > > AVSubtitleArea[0] <=> buf[0], buf[1] > AVSubtitleArea[1] <=> buf[2], buf[3] >
I suppose the main problem is that there can be more areas then we have buf entries? There is just one small wrinkle, there is an expectation in various areas of the code that an empty frame has buf[0] zero, and conversely a filled one does not. Perhaps we can use buf and extended_buf as needed, just so it fits into the established paradigm? Having more then 8 areas is possible, but not necessarily always the case. If the presence of the buf is also the only difference to AVSubtitleRect, there is no reason to not continue using it and moving it to avutil, and just have AVSubtitle itself be deprecated in the long-term. - Hendrik _______________________________________________ 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".