]> git.sesse.net Git - ffmpeg/commit
avformat/utils: Improve parsing packets
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 20 Sep 2019 20:39:15 +0000 (22:39 +0200)
committerJames Almer <jamrial@gmail.com>
Sat, 28 Sep 2019 21:32:44 +0000 (18:32 -0300)
commit5c95af6b7c8ea7fa700f91e9ab55ef2713b6f02f
treecf8bc7dcee3b04b06fde4807652f31f1b841b74e
parentcdba00ae113c94ef243bc238c64678c7bca82084
avformat/utils: Improve parsing packets

Up until now, parse_packet() used a stack packet in case the stream is
flushed. But using such a packet is unnecessary as there is an AVPacket
readily available, it just needs to be used. Whether flushing is intended
or not will now be signalled by an explicit parameter rather than by
whether the packet parameter is NULL. This removes a few checks in
parse_packet(), gets rid of the initialization of the stack packet and
also reduces usage of sizeof(AVPacket) in libavformat.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/utils.c