[vlc-commits] codec: videotoolbox: restart from pps/sps change only on iframes
Francois Cartegnie
git at videolan.org
Mon Jul 10 14:00:19 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jul 10 13:57:41 2017 +0200| [e0be6843f71b1308bfa1e6882d63b5269afb0fef] | committer: Francois Cartegnie
codec: videotoolbox: restart from pps/sps change only on iframes
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e0be6843f71b1308bfa1e6882d63b5269afb0fef
---
modules/codec/videotoolbox.m | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index e7668d0b78..4dc7c920cf 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -1257,7 +1257,11 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
return VLCDEC_SUCCESS;
}
- if (b_config_changed)
+ frame_info_t *p_info = CreateReorderInfo(p_dec, p_block);
+ if(unlikely(!p_info))
+ goto skip;
+
+ if (b_config_changed && p_info->b_flush)
{
/* decoding didn't start yet, which is ok for H264, let's see
* if we can use this block to get going */
@@ -1277,13 +1281,12 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
StartVideoToolbox(p_dec);
}
if (!p_sys->session)
+ {
+ free(p_info);
goto skip;
+ }
}
- frame_info_t *p_info = CreateReorderInfo(p_dec, p_block);
- if(unlikely(!p_info))
- goto skip;
-
CMSampleBufferRef sampleBuffer =
VTSampleBufferCreate(p_dec, p_sys->videoFormatDescription, p_block);
if (unlikely(!sampleBuffer))
More information about the vlc-commits
mailing list