[vlc-commits] videotoolbox: simplify StopVideoToolbox args
Thomas Guillem
git at videolan.org
Tue Jan 9 18:19:50 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jan 9 13:07:17 2018 +0100| [5d3cc23b1330c93f8ead441783c552e6ee4c03f8] | committer: Thomas Guillem
videotoolbox: simplify StopVideoToolbox args
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5d3cc23b1330c93f8ead441783c552e6ee4c03f8
---
modules/codec/videotoolbox.m | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 12af74102f..2a990d8fbe 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1218,7 +1218,7 @@ static int StartVideoToolbox(decoder_t *p_dec)
return VLC_SUCCESS;
}
-static void StopVideoToolbox(decoder_t *p_dec, bool b_reset_format)
+static void StopVideoToolbox(decoder_t *p_dec)
{
decoder_sys_t *p_sys = p_dec->p_sys;
@@ -1244,15 +1244,11 @@ static void StopVideoToolbox(decoder_t *p_dec, bool b_reset_format)
p_dec->fmt_out.video.i_visible_width = p_dec->fmt_out.video.i_visible_height = 64;
(void) decoder_UpdateVideoFormat(p_dec);
p_dec->fmt_out.video = orig;
- b_reset_format = true;
}
#endif
- if (b_reset_format)
- {
- p_sys->b_format_propagated = false;
- p_dec->fmt_out.i_codec = 0;
- }
+ p_sys->b_format_propagated = false;
+ p_dec->fmt_out.i_codec = 0;
}
if (p_sys->videoFormatDescription != nil) {
@@ -1403,7 +1399,7 @@ static void CloseDecoder(vlc_object_t *p_this)
decoder_t *p_dec = (decoder_t *)p_this;
decoder_sys_t *p_sys = p_dec->p_sys;
- StopVideoToolbox(p_dec, true);
+ StopVideoToolbox(p_dec);
if(p_sys->pf_codec_clean)
p_sys->pf_codec_clean(p_dec);
@@ -1784,7 +1780,7 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
vlc_mutex_unlock(&p_sys->lock);
/* Session will be started by Late Start code block */
- StopVideoToolbox(p_dec, true);
+ StopVideoToolbox(p_dec);
vlc_mutex_lock(&p_sys->lock);
p_sys->vtsession_status = VTSESSION_STATUS_OK;
@@ -1834,7 +1830,7 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
msg_Dbg(p_dec, "parameters sets changed: draining decoder");
Drain(p_dec, false);
msg_Dbg(p_dec, "parameters sets changed: restarting decoder");
- StopVideoToolbox(p_dec, true);
+ StopVideoToolbox(p_dec);
}
if(!p_sys->session)
More information about the vlc-commits
mailing list