aboutsummaryrefslogtreecommitdiffstats
path: root/libpostproc
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-22 19:22:25 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-26 06:36:43 +0100
commitb93ed5c28ecc06a0a5e54994439c9a65fa0f96c4 (patch)
treea1c5e1a83f9535e0cdfd0fc5e696b271e50735c1 /libpostproc
parent5144455c201185861072e66884bba16c48b4812d (diff)
downloadffmpeg-b93ed5c28ecc06a0a5e54994439c9a65fa0f96c4.tar.gz
avformat/fitsdec: Don't use AVBPrint for temporary storage
Most of the data in the temporary storage ends up being returned to the user as AVPacket.data, so it makes sense to avoid using the AVBPrint for temporary storage altogether (in particular in light of the fact that the blocks read here are too big for the small-string optimization anyway) and read the data directly into AVPacket.data. This also avoids another memcpy() from a stack buffer to the AVBPrint in ts_image() (that could always have been avoided with av_bprint_get_buffer()). These changes also allow to use av_append_packet(), which greatly simplifies the code; furthermore, one can avoid cleanup code on error as the packet is already unreferenced generically on error. There are two user-visible changes from this patch: 1. Truncated packets are now marked as corrupt. 2. AVPacket.pos is set (it corresponds to the discarded header line, 80 bytes before the position corresponding to the actual packet data). Furthermore, this patch also removes code that triggered a -Wtautological-constant-out-of-range-compare warning from Clang (namely a comparison of an unsigned and INT64_MAX in an assert). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libpostproc')
0 files changed, 0 insertions, 0 deletions