diff options
author | Marth64 <marth64@proxyid.net> | 2024-04-02 00:24:53 -0500 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2024-04-02 19:59:01 +0200 |
commit | 1c3533367188ea25bace9dedd6ee63fb1112b14d (patch) | |
tree | 4f682a150d4474157b9a320cce6169f11b8a1afd /libavutil | |
parent | ed9363052f4b8b89ed2f1415f392d39788dab0d3 (diff) | |
download | ffmpeg-1c3533367188ea25bace9dedd6ee63fb1112b14d.tar.gz |
avformat/subtitles: extend ff_subtitles_queue_insert() to support not yet available events
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 happens to pass an empty cue or wants to
use av_get_packet() to read bytes, there are no unnecessary
operations on the packet after it is allocated.
Signed-off-by: Marth64 <marth64@proxyid.net>
Diffstat (limited to 'libavutil')
0 files changed, 0 insertions, 0 deletions