[vlc-commits] codec: videotoolbox: use VideoToolboxNeedsToRestartH264 for HEVC
Thomas Guillem
git at videolan.org
Tue Jan 16 17:06:16 CET 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Jan 16 16:51:24 2018 +0100| [1c7e907ab62a4af88bc9881e7f8f9b40a2a1d8b5] | committer: Thomas Guillem
codec: videotoolbox: use VideoToolboxNeedsToRestartH264 for HEVC
(cherry picked from commit 63c21a090bf5dc5d570bceb5fd8b089047ce3595)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=1c7e907ab62a4af88bc9881e7f8f9b40a2a1d8b5
---
modules/codec/videotoolbox.m | 14 ++++----------
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index d6e0dae06c..bb377cf1c6 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -493,7 +493,8 @@ static bool ConfigureVoutH264(decoder_t *p_dec)
static bool VideoToolboxNeedsToRestartH264(decoder_t *p_dec,
VTDecompressionSessionRef session)
{
- const struct hxxx_helper *hh = &p_dec->p_sys->hh;
+ decoder_sys_t *p_sys = p_dec->p_sys;
+ const struct hxxx_helper *hh = &p_sys->hh;
unsigned w, h, vw, vh;
int sarn, sard;
@@ -513,7 +514,7 @@ static bool VideoToolboxNeedsToRestartH264(decoder_t *p_dec,
CMFormatDescriptionRef newvideoFormatDesc;
/* create new video format description */
OSStatus status = CMVideoFormatDescriptionCreate(kCFAllocatorDefault,
- kCMVideoCodecType_H264,
+ p_sys->codec,
vw, vh,
decoderConfiguration,
&newvideoFormatDesc);
@@ -679,14 +680,6 @@ static bool FillReorderInfoHEVC(decoder_t *p_dec, const block_t *p_block,
return false;
}
-static bool VideoToolboxNeedsToRestartHEVC(decoder_t *p_dec,
- VTDecompressionSessionRef session)
-{
- VLC_UNUSED(p_dec);
- VLC_UNUSED(session);
- return false;
-}
-
static CFMutableDictionaryRef GetDecoderExtradataHEVC(decoder_t *p_dec)
{
decoder_sys_t *p_sys = p_dec->p_sys;
@@ -731,6 +724,7 @@ static bool CodecSupportedHEVC(decoder_t *p_dec)
#define ConfigureVoutHEVC ConfigureVoutH264
#define ProcessBlockHEVC ProcessBlockH264
+#define VideoToolboxNeedsToRestartHEVC VideoToolboxNeedsToRestartH264
static CFMutableDictionaryRef GetDecoderExtradataMPEG4(decoder_t *p_dec)
{
More information about the vlc-commits
mailing list