[vlc-commits] sout: transcode: simplify code
Steve Lhomme
git at videolan.org
Wed Jan 8 12:47:27 CET 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Aug 23 10:51:00 2019 +0200| [483035fbc92b90903c8978d0c5e6b5720893cfbd] | committer: Steve Lhomme
sout: transcode: simplify code
No need for else after a return.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=483035fbc92b90903c8978d0c5e6b5720893cfbd
---
modules/stream_out/transcode/encoder/video.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/modules/stream_out/transcode/encoder/video.c b/modules/stream_out/transcode/encoder/video.c
index 0e20f43017..24cf478da8 100644
--- a/modules/stream_out/transcode/encoder/video.c
+++ b/modules/stream_out/transcode/encoder/video.c
@@ -488,14 +488,12 @@ block_t * transcode_encoder_video_encode( transcode_encoder_t *p_enc, picture_t
{
return p_enc->p_encoder->pf_encode_video( p_enc->p_encoder, p_pic );
}
- else
- {
- vlc_sem_wait( &p_enc->picture_pool_has_room );
- vlc_mutex_lock( &p_enc->lock_out );
- picture_Hold( p_pic );
- picture_fifo_Push( p_enc->pp_pics, p_pic );
- vlc_cond_signal( &p_enc->cond );
- vlc_mutex_unlock( &p_enc->lock_out );
- return NULL;
- }
+
+ vlc_sem_wait( &p_enc->picture_pool_has_room );
+ vlc_mutex_lock( &p_enc->lock_out );
+ picture_Hold( p_pic );
+ picture_fifo_Push( p_enc->pp_pics, p_pic );
+ vlc_cond_signal( &p_enc->cond );
+ vlc_mutex_unlock( &p_enc->lock_out );
+ return NULL;
}
More information about the vlc-commits
mailing list