diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-05-25 10:14:00 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-07-01 18:59:27 +0200 |
commit | d8407afe021c525c25b6b39ae2d8dc3b6dbde6fe (patch) | |
tree | 6d8044074760a847dc558b08b9bd51c4f75c9318 /libavfilter/stereo3d.h | |
parent | b6546add07d428320e74217d79decfabb86f173b (diff) | |
download | ffmpeg-d8407afe021c525c25b6b39ae2d8dc3b6dbde6fe.tar.gz |
avformat/aviobuf: Also return truncated buffer in avio_get_dyn_buf()
Two kinds of errors can happen when working with dynamic buffers:
(Re)allocation errors or truncation errors (one has to truncate the
buffer to a size of INT_MAX because avio_close_dyn_buf() and
avio_get_dyn_buf() both return an int). Right now, avio_get_dyn_buf()
returns an empty buffer in either case. But given that
avio_get_dyn_buf() does not destroy the dynamic buffer, one can return
the buffer in case of truncation and let the user check the error flags
and decide for himself instead of hardcoding a single way to proceed
in case of truncation.
(This actually restores the behaviour from before commit
163bb9ac0af495a5cb95441bdb5c02170440d28c.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
(cherry picked from commit c33e56c7a6a8bef7d95e1d36eb2f35748d475695)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavfilter/stereo3d.h')
0 files changed, 0 insertions, 0 deletions