diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-07-23 09:32:43 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-08-19 21:37:22 +0200 |
commit | 4bda7f288c7bb8f78b0c3b379da91330af5dd4ac (patch) | |
tree | 689aa711d98aba4b6473ea1086505687362a0914 | |
parent | 6174818252fd45a503d9ef6b8da3973df644c5a9 (diff) | |
download | ffmpeg-4bda7f288c7bb8f78b0c3b379da91330af5dd4ac.tar.gz |
lavc/videotoolbox: drop HEVC cropping from start_frame rather than end_frame
HEVCContext.output_frame will be removed in following commits.
Reported-By: Max Bykov
-rw-r--r-- | libavcodec/videotoolbox.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c index 3dd804bb0c..505483ef66 100644 --- a/libavcodec/videotoolbox.c +++ b/libavcodec/videotoolbox.c @@ -1053,6 +1053,14 @@ static int videotoolbox_hevc_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) { + HEVCContext *h = avctx->priv_data; + AVFrame *frame = h->cur_frame->f; + + frame->crop_right = 0; + frame->crop_left = 0; + frame->crop_top = 0; + frame->crop_bottom = 0; + return 0; } @@ -1079,11 +1087,6 @@ static int videotoolbox_hevc_end_frame(AVCodecContext *avctx) VTContext *vtctx = avctx->internal->hwaccel_priv_data; int ret; - h->output_frame->crop_right = 0; - h->output_frame->crop_left = 0; - h->output_frame->crop_top = 0; - h->output_frame->crop_bottom = 0; - ret = ff_videotoolbox_common_end_frame(avctx, frame); vtctx->bitstream_size = 0; return ret; |