Re: [FFmpeg-devel] [PATCH v9 1/5] avformat/subtitles: extend ff_subtitles_queue_insert() to support not yet available events

2024-03-26 Thread Andreas Rheinhardt
Marth64: > If ff_subtitles_queue_insert() were given a NULL buffer > with 0 length, it would still attempt to grow the packet > or memcpy depending on if merge option is enabled. > > In this commit, allow passing a NULL buffer with 0 length > without attempting to do such operations. This way, if

Re: [FFmpeg-devel] [PATCH v9 1/5] avformat/subtitles: extend ff_subtitles_queue_insert() to support not yet available events

2024-03-26 Thread Marth64
> is the move needed? (but not blocking) It is not needed, but the code flows better I think in terms of readability. I think it feels cleaner to say, "set up `sub` then add it to the array" vs. "set up sub's data, add it to the array, then set up its other fields". But, I am good either way and

Re: [FFmpeg-devel] [PATCH v9 1/5] avformat/subtitles: extend ff_subtitles_queue_insert() to support not yet available events

2024-03-26 Thread Stefano Sabatini
On date Saturday 2024-03-23 21:25:00 -0500, Marth64 wrote: > If ff_subtitles_queue_insert() were given a NULL buffer > with 0 length, it would still attempt to grow the packet > or memcpy depending on if merge option is enabled. > > In this commit, allow passing a NULL buffer with 0 length >

[FFmpeg-devel] [PATCH v9 1/5] avformat/subtitles: extend ff_subtitles_queue_insert() to support not yet available events

2024-03-23 Thread Marth64
If ff_subtitles_queue_insert() were given a NULL buffer with 0 length, it would still attempt to grow the packet or memcpy depending on if merge option is enabled. In this commit, allow passing a NULL buffer with 0 length without attempting to do such operations. This way, if a subtitle demuxer