diff options
author | Aman Gupta <aman@tmm1.net> | 2017-11-10 23:34:41 +0300 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2017-11-14 01:32:48 +0300 |
commit | 68ef503bb5f9f8bd4460191d6a9c9e2ec4179a26 (patch) | |
tree | a938856c7f58639789fede83821340fc7442c7d1 /libavcodec/videotoolbox.c | |
parent | 3a91b3ae742425c25b9b80708f3c111537e570d3 (diff) |
avcodec/videotoolbox: pass through hevc param changes to the decoder
This includes the SEI_PREFIX/SEI_SUFFIX NALUs, which can contain
updates like HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS. Previously, hevc
samples with this SEI present would not playback correctly.
See for example https://github.com/lhc70000/iina/issues/1123
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavcodec/videotoolbox.c')
-rw-r--r-- | libavcodec/videotoolbox.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 1307e93bcc..3c9077bf34 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -654,6 +654,14 @@ static int videotoolbox_h264_end_frame(AVCodecContext *avctx) return ret; } +static int videotoolbox_hevc_decode_params(AVCodecContext *avctx, + int type, + const uint8_t *buffer, + uint32_t size) +{ + return ff_videotoolbox_h264_decode_slice(avctx, buffer, size); +} + static int videotoolbox_hevc_end_frame(AVCodecContext *avctx) { HEVCContext *h = avctx->priv_data; @@ -1040,6 +1048,7 @@ AVHWAccel ff_hevc_videotoolbox_hwaccel = { .alloc_frame = ff_videotoolbox_alloc_frame, .start_frame = ff_videotoolbox_h264_start_frame, .decode_slice = ff_videotoolbox_h264_decode_slice, + .decode_params = videotoolbox_hevc_decode_params, .end_frame = videotoolbox_hevc_end_frame, .frame_params = videotoolbox_frame_params, .init = videotoolbox_common_init, |