]> git.sesse.net Git - ffmpeg/commit
avformat/mux: Remove redundant checks for write errors
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 12 Mar 2020 17:54:07 +0000 (18:54 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 14 Mar 2020 17:24:04 +0000 (18:24 +0100)
commit5c5ab88967f0f00c5586a1fbf344aeb1166234f0
treeebdfc64014e1215b500644f566c156e693a19809
parentcc2a9509ce79793fcd00f91bb6ca3f4c53721e9e
avformat/mux: Remove redundant checks for write errors

If writing a packet didn't directly return an error, the AVIOContext's
error flag is checked for errors (if existing) by write_packet(). And if
write_packet() didn't indicate an error, its callers checked the error
flag of the AVIOContext (if existing). The latter check is redundant.

The reason for checking twice lies in the FFmpeg-Libav split: The check
in write_packet() has been added in 9ad1e0c1 in Libav. FFmpeg already
had the other checks (since aec9390a), but when 9ad1e0c1 was merged
(in 1f1c1008), no one noticed the redundant checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mux.c