[vlc-commits] videotoolbox: check fallback before changing the block

Thomas Guillem git at videolan.org
Fri Jan 20 16:15:47 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jan 20 16:06:02 2017 +0100| [ccdce77fa10e0088b2c06485f282340a672034da] | committer: Thomas Guillem

videotoolbox: check fallback before changing the block

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

 modules/codec/videotoolbox.m | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index 30efd1a..84a6e3d7 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1073,12 +1073,6 @@ static picture_t *DecodeBlock(decoder_t *p_dec, block_t **pp_block)
     if (!p_sys->session)
         goto skip;
 
-    if (p_sys->codec == kCMVideoCodecType_H264) {
-        p_block = H264ProcessBlock(p_dec, p_block);
-        if (!p_block)
-            return NULL;
-    }
-
     if (p_block->i_pts == VLC_TS_INVALID && p_block->i_dts != VLC_TS_INVALID &&
         p_sys->i_pic_reorder_max > 1)
     {
@@ -1088,6 +1082,12 @@ static picture_t *DecodeBlock(decoder_t *p_dec, block_t **pp_block)
         goto reload;
     }
 
+    if (p_sys->codec == kCMVideoCodecType_H264) {
+        p_block = H264ProcessBlock(p_dec, p_block);
+        if (!p_block)
+            return NULL;
+    }
+
     CMSampleBufferRef sampleBuffer =
         VTSampleBufferCreate(p_dec, p_sys->videoFormatDescription, p_block);
     if (unlikely(!sampleBuffer))



More information about the vlc-commits mailing list