@ -903,6 +903,11 @@ static int videotoolbox_common_end_frame(AVCodecContext *avctx, AVFrame *frame)
AVVideotoolboxContext * videotoolbox = videotoolbox_get_context ( avctx ) ;
AVVideotoolboxContext * videotoolbox = videotoolbox_get_context ( avctx ) ;
VTContext * vtctx = avctx - > internal - > hwaccel_priv_data ;
VTContext * vtctx = avctx - > internal - > hwaccel_priv_data ;
frame - > crop_right = 0 ;
frame - > crop_left = 0 ;
frame - > crop_top = 0 ;
frame - > crop_bottom = 0 ;
if ( vtctx - > reconfig_needed = = true ) {
if ( vtctx - > reconfig_needed = = true ) {
vtctx - > reconfig_needed = false ;
vtctx - > reconfig_needed = false ;
av_log ( avctx , AV_LOG_VERBOSE , " VideoToolbox decoder needs reconfig, restarting.. \n " ) ;
av_log ( avctx , AV_LOG_VERBOSE , " VideoToolbox decoder needs reconfig, restarting.. \n " ) ;
@ -969,6 +974,12 @@ static int videotoolbox_hevc_end_frame(AVCodecContext *avctx)
HEVCContext * h = avctx - > priv_data ;
HEVCContext * h = avctx - > priv_data ;
AVFrame * frame = h - > ref - > frame ;
AVFrame * frame = h - > ref - > frame ;
VTContext * vtctx = avctx - > internal - > hwaccel_priv_data ;
VTContext * vtctx = avctx - > internal - > hwaccel_priv_data ;
h - > output_frame - > crop_right = 0 ;
h - > output_frame - > crop_left = 0 ;
h - > output_frame - > crop_top = 0 ;
h - > output_frame - > crop_bottom = 0 ;
int ret = videotoolbox_common_end_frame ( avctx , frame ) ;
int ret = videotoolbox_common_end_frame ( avctx , frame ) ;
vtctx - > bitstream_size = 0 ;
vtctx - > bitstream_size = 0 ;
return ret ;
return ret ;