[FFmpeg-devel] [PATCH 1/2] avformat/mux: Remove redundant checks for write errors

Michael Niedermayer michael at niedermayer.cc
Sat Mar 14 19:22:04 EET 2020


On Thu, Mar 12, 2020 at 06:54:07PM +0100, Andreas Rheinhardt wrote:
> 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 at gmail.com>
> ---
>  libavformat/mux.c | 6 ------
>  1 file changed, 6 deletions(-)

will apply the 2 patches of the set

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

When the tyrant has disposed of foreign enemies by conquest or treaty, and
there is nothing more to fear from them, then he is always stirring up
some war or other, in order that the people may require a leader. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200314/32e89ff8/attachment.sig>


More information about the ffmpeg-devel mailing list