[vlc-devel] [PATCH 06/13] sout: transcode: simplify code
Steve Lhomme
robux4 at ycbcr.xyz
Mon Dec 23 16:49:30 CET 2019
No need for else after a return.
---
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 0e20f430171..24cf478da89 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;
}
--
2.17.1
More information about the vlc-devel
mailing list