@ -2788,11 +2788,13 @@ static int set_side_data(HEVCContext *s)
if ( s - > sei . timecode . present ) {
uint32_t * tc_sd ;
char tcbuf [ AV_TIMECODE_STR_SIZE ] ;
AVFrameSideData * tcside = av_frame_new_side_data ( out , AV_FRAME_DATA_S12M_TIMECODE ,
sizeof ( uint32_t ) * 4 ) ;
if ( ! tcside )
return AVERROR ( ENOMEM ) ;
AVFrameSideData * tcside ;
ret = ff_frame_new_side_data ( s - > avctx , out , AV_FRAME_DATA_S12M_TIMECODE ,
sizeof ( uint32_t ) * 4 , & tcside ) ;
if ( ret < 0 )
return ret ;
if ( tcside ) {
tc_sd = ( uint32_t * ) tcside - > data ;
tc_sd [ 0 ] = s - > sei . timecode . num_clock_ts ;
@ -2807,6 +2809,7 @@ static int set_side_data(HEVCContext *s)
av_timecode_make_smpte_tc_string2 ( tcbuf , s - > avctx - > framerate , tc_sd [ i + 1 ] , 0 , 0 ) ;
av_dict_set ( & out - > metadata , " timecode " , tcbuf , 0 ) ;
}
}
s - > sei . timecode . num_clock_ts = 0 ;
}
@ -2816,10 +2819,9 @@ static int set_side_data(HEVCContext *s)
if ( ! info_ref )
return AVERROR ( ENOMEM ) ;
if ( ! av_frame_new_side_data_from_buf ( out , AV_FRAME_DATA_DYNAMIC_HDR_PLUS , info_ref ) ) {
av_buffer_unref ( & info_ref ) ;
return AVERROR ( ENOMEM ) ;
}
ret = ff_frame_new_side_data_from_buf ( s - > avctx , out , AV_FRAME_DATA_DYNAMIC_HDR_PLUS , & info_ref , NULL ) ;
if ( ret < 0 )
return ret ;
}
if ( s - > rpu_buf ) {