• Andreas Rheinhardt's avatar
    avformat/aviobuf: Also return truncated buffer in avio_get_dyn_buf() · d8407afe
    Andreas Rheinhardt authored
    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
    163bb9ac.)
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    (cherry picked from commit c33e56c7a6a8bef7d95e1d36eb2f35748d475695)
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    d8407afe
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
RELEASE_NOTES Loading commit data...
configure Loading commit data...