vlc | branch: master | Steve Lhomme <[email protected]> | Fri Jan 10 14:36:55 2020 +0100| [d939fb226fba3dc78ad1a39202f82114bca4ca50] | committer: Steve Lhomme
mmal: codec: simplify the goto on success One less indentation and it will make the next cleaning easier. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d939fb226fba3dc78ad1a39202f82114bca4ca50 --- modules/hw/mmal/codec.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/modules/hw/mmal/codec.c b/modules/hw/mmal/codec.c index b7c8b283fe..dc3fc08b17 100644 --- a/modules/hw/mmal/codec.c +++ b/modules/hw/mmal/codec.c @@ -292,16 +292,14 @@ static int change_output_format(decoder_t *dec) if (atomic_load(&sys->started)) { mmal_format_full_copy(sys->output->format, sys->output_format); status = mmal_port_format_commit(sys->output); - if (status != MMAL_SUCCESS) { - msg_Err(dec, "Failed to commit output format (status=%"PRIx32" %s)", - status, mmal_status_to_string(status)); - ret = -1; - goto port_reset; - } - goto apply_fmt; + if (status == MMAL_SUCCESS) + goto apply_fmt; + + msg_Err(dec, "Failed to commit output format (status=%"PRIx32" %s)", + status, mmal_status_to_string(status)); + ret = -1; } -port_reset: msg_Dbg(dec, "%s: Do full port reset", __func__); status = mmal_port_disable(sys->output); if (status != MMAL_SUCCESS) { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
