• Andreas Rheinhardt's avatar
    avformat/utils: Preserve integrity of linked list · 90f647c2
    Andreas Rheinhardt authored
    1. Instead of relying on ff_packet_list_get to get the oldest element in
    an AVPacketList, ff_read_packet used its own ad-hoc code. Said code
    forgot to set the end of the list to NULL if the last element of the
    list has been removed, thereby leaving the list in an inconsistent state.
    2. Furthermore, if the list was not empty, the oldest element of the
    list would always be copied into another packet structure before it was
    known whether the oldest entry of the list would be removed. This makes
    the ownership confusing and potentially copies unnecessarily.
    
    Both of these issues have been fixed. ff_packet_list_get is used now.
    Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
    Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
    90f647c2
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...
.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...
configure Loading commit data...