[vlc-commits] videotoolbox: clean old parameter sets on restart

Thomas Guillem git at videolan.org
Fri Jan 12 09:48:45 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jan  9 09:28:10 2018 +0100| [88a2b56470202c975cad09b3c54e8e7c2873fa95] | committer: Thomas Guillem

videotoolbox: clean old parameter sets on restart

(cherry picked from commit 40a40187a33c38e52fa4d7704474c13bf0c689ed)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=88a2b56470202c975cad09b3c54e8e7c2873fa95
---

 modules/codec/videotoolbox.m | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 2a990d8fbe..c14abf69d1 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1781,6 +1781,11 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
 
         /* Session will be started by Late Start code block */
         StopVideoToolbox(p_dec);
+        if (p_dec->fmt_in.i_extra == 0)
+        {
+            /* Clean old parameter sets since they may be corrupt */
+            hxxx_helper_clean(&p_sys->hh);
+        }
 
         vlc_mutex_lock(&p_sys->lock);
         p_sys->vtsession_status = VTSESSION_STATUS_OK;



More information about the vlc-commits mailing list