diff options
Diffstat (limited to 'media/ffvpx/libavutil/frame.c')
-rw-r--r-- | media/ffvpx/libavutil/frame.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/media/ffvpx/libavutil/frame.c b/media/ffvpx/libavutil/frame.c index d5c7c9f32f..53e6174223 100644 --- a/media/ffvpx/libavutil/frame.c +++ b/media/ffvpx/libavutil/frame.c @@ -99,12 +99,16 @@ static void get_frame_defaults(AVFrame *frame) memset(frame, 0, sizeof(*frame)); frame->pts = - frame->pkt_dts = + frame->pkt_dts = AV_NOPTS_VALUE; +#if FF_API_PKT_PTS +FF_DISABLE_DEPRECATION_WARNINGS frame->pkt_pts = AV_NOPTS_VALUE; - av_frame_set_best_effort_timestamp(frame, AV_NOPTS_VALUE); - av_frame_set_pkt_duration (frame, 0); - av_frame_set_pkt_pos (frame, -1); - av_frame_set_pkt_size (frame, -1); +FF_ENABLE_DEPRECATION_WARNINGS +#endif + frame->best_effort_timestamp = AV_NOPTS_VALUE; + frame->pkt_duration = 0; + frame->pkt_pos = -1; + frame->pkt_size = -1; frame->key_frame = 1; frame->sample_aspect_ratio = (AVRational){ 0, 1 }; frame->format = -1; /* unknown */ @@ -114,6 +118,7 @@ static void get_frame_defaults(AVFrame *frame) frame->colorspace = AVCOL_SPC_UNSPECIFIED; frame->color_range = AVCOL_RANGE_UNSPECIFIED; frame->chroma_location = AVCHROMA_LOC_UNSPECIFIED; + frame->flags = 0; } static void free_side_data(AVFrameSideData **ptr_sd) @@ -294,7 +299,11 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy) dst->palette_has_changed = src->palette_has_changed; dst->sample_rate = src->sample_rate; dst->opaque = src->opaque; +#if FF_API_PKT_PTS +FF_DISABLE_DEPRECATION_WARNINGS dst->pkt_pts = src->pkt_pts; +FF_ENABLE_DEPRECATION_WARNINGS +#endif dst->pkt_dts = src->pkt_dts; dst->pkt_pos = src->pkt_pos; dst->pkt_size = src->pkt_size; |