aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avpacket.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2019-08-19 23:56:19 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-09-18 22:53:00 +0200
commit90f647c29be3eb436fb8b6be612f64ec686a48a8 (patch)
treeefd5229fc54f17fd6c024accb0e022a5c7329a6b /libavcodec/avpacket.c
parent8b1be6e5eb8560ed19e7f22616041a6094610137 (diff)
downloadffmpeg-90f647c29be3eb436fb8b6be612f64ec686a48a8.tar.gz
avformat/utils: Preserve integrity of linked list
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: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/avpacket.c')
0 files changed, 0 insertions, 0 deletions