diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-02-12 12:18:23 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-03-28 03:54:48 +0100 |
commit | e621f2b6cd95a69db637d0ed979cf9e614b58cac (patch) | |
tree | 3f4eff2af4490919179f89eda036fdf0451ff3cb /libavcodec/g723_1.c | |
parent | 26a36801c0496ec0975af1b7af3ced220aa2aa18 (diff) | |
download | ffmpeg-e621f2b6cd95a69db637d0ed979cf9e614b58cac.tar.gz |
avcodec/avpacket: Always treat dst in av_packet_ref as uninitialized
av_packet_ref() mostly treated the destination packet dst as uninitialized,
i.e. the destination fields were simply overwritten. But if the source
packet was not reference-counted, dst->buf was treated as if it pointed
to an already allocated buffer (if != NULL) to be reallocated to the
desired size.
The documentation did not explicitly state whether the dst will be treated
as uninitialized, but it stated that if the source packet is not refcounted,
a new buffer in dst will be allocated. This and the fact that the side-data
as well as the codepath taken in case src is refcounted always treated the
packet as uninitialized means that dst should always be treated as
uninitialized for the sake of consistency. And this behaviour has been
explicitly documented.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/g723_1.c')
0 files changed, 0 insertions, 0 deletions