diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-09-20 22:39:11 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-09-28 18:32:43 -0300 |
commit | 47a4528abc9702da02b2115c4ad235e70138648a (patch) | |
tree | d6e2924a78d52cfd6bd50903d8ba1dbbf42d4d90 /CONTRIBUTING.md | |
parent | 551e8dc145939f575fbe4f71200c6442c9869cdf (diff) | |
download | ffmpeg-47a4528abc9702da02b2115c4ad235e70138648a.tar.gz |
avformat/utils: Don't initialize in loops
Since the recent changes to ff_packet_list_put, the source packet will
be automatically reset when the reference is moved to the packet list,
so that it is unnecessary to reinitialize the packet in the loops in
parse_packet and ff_read_packet; initializing once at the beginning is
enough.
This also fixes a potential, but currently unexisting problem: If the
raw packet buffer was initially not empty and probe_codec() failed,
then the packet returned would not be initialized. But given that
probe_codec() currently can't fail (always returns 0) this was not an
acute danger.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'CONTRIBUTING.md')
0 files changed, 0 insertions, 0 deletions