avutil/frame: Remove deprecated AVFrame.pkt_pts field
Deprecated in 32c8359093d1ff4f45ed19518b449b3ac3769d27. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
		
							parent
							
								
									3b56fa85e8
								
							
						
					
					
						commit
						6e30b35b85
					
				@ -540,11 +540,6 @@ static int ffat_decode(AVCodecContext *avctx, void *data,
 | 
			
		||||
        *got_frame_ptr = 1;
 | 
			
		||||
        if (at->last_pts != AV_NOPTS_VALUE) {
 | 
			
		||||
            frame->pts = at->last_pts;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
            frame->pkt_pts = at->last_pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
            at->last_pts = avpkt->pts;
 | 
			
		||||
        }
 | 
			
		||||
    } else if (ret && ret != 1) {
 | 
			
		||||
 | 
			
		||||
@ -537,11 +537,6 @@ static inline CopyRet copy_frame(AVCodecContext *avctx,
 | 
			
		||||
        frame->top_field_first = !bottom_first;
 | 
			
		||||
 | 
			
		||||
    frame->pts = pkt_pts;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
    frame->pkt_pts = pkt_pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    frame->pkt_pos = -1;
 | 
			
		||||
    frame->pkt_duration = 0;
 | 
			
		||||
 | 
			
		||||
@ -614,11 +614,6 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame)
 | 
			
		||||
        /* CUVIDs opaque reordering breaks the internal pkt logic.
 | 
			
		||||
         * So set pkt_pts and clear all the other pkt_ fields.
 | 
			
		||||
         */
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
        frame->pkt_pts = frame->pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
        frame->pkt_pos = -1;
 | 
			
		||||
        frame->pkt_duration = 0;
 | 
			
		||||
        frame->pkt_size = -1;
 | 
			
		||||
 | 
			
		||||
@ -394,12 +394,6 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame,
 | 
			
		||||
                                                   avctx->pkt_timebase);
 | 
			
		||||
                    if(frame->pts!=AV_NOPTS_VALUE)
 | 
			
		||||
                        frame->pts += diff_ts;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
                    if(frame->pkt_pts!=AV_NOPTS_VALUE)
 | 
			
		||||
                        frame->pkt_pts += diff_ts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
                    if(frame->pkt_dts!=AV_NOPTS_VALUE)
 | 
			
		||||
                        frame->pkt_dts += diff_ts;
 | 
			
		||||
                    if (frame->pkt_duration >= diff_ts)
 | 
			
		||||
@ -1504,11 +1498,6 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
 | 
			
		||||
                             pkt, sizeof(*pkt), NULL);
 | 
			
		||||
 | 
			
		||||
    frame->pts = pkt->pts;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
    frame->pkt_pts = pkt->pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
    frame->pkt_pos      = pkt->pos;
 | 
			
		||||
    frame->pkt_duration = pkt->duration;
 | 
			
		||||
    frame->pkt_size     = pkt->size;
 | 
			
		||||
 | 
			
		||||
@ -472,11 +472,6 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, A
 | 
			
		||||
    bytestream2_init(&s->gb, avpkt->data, avpkt->size);
 | 
			
		||||
 | 
			
		||||
    s->frame->pts     = avpkt->pts;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
    s->frame->pkt_pts = avpkt->pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
    s->frame->pkt_dts = avpkt->dts;
 | 
			
		||||
    s->frame->pkt_duration = avpkt->duration;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -314,11 +314,6 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
 | 
			
		||||
 | 
			
		||||
    // match timestamps and packet size
 | 
			
		||||
    frame->pts = p->m.timestamp;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
    frame->pkt_pts = p->m.timestamp;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
    frame->pkt_dts = p->m.timestamp;
 | 
			
		||||
    frame->pkt_pos = p->m.offset;
 | 
			
		||||
    frame->pkt_size = p->m.size;
 | 
			
		||||
 | 
			
		||||
@ -144,11 +144,6 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data,
 | 
			
		||||
 | 
			
		||||
    avframe->pts     = info.uiOutYuvTimeStamp;
 | 
			
		||||
    avframe->pkt_dts = AV_NOPTS_VALUE;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
    avframe->pkt_pts = avpkt->pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
#if OPENH264_VER_AT_LEAST(1, 7)
 | 
			
		||||
    (*s->decoder)->GetOption(s->decoder, DECODER_OPTION_PROFILE, &opt);
 | 
			
		||||
    avctx->profile = opt;
 | 
			
		||||
 | 
			
		||||
@ -293,11 +293,6 @@ static int mediacodec_wrap_hw_buffer(AVCodecContext *avctx,
 | 
			
		||||
    } else {
 | 
			
		||||
        frame->pts = info->presentationTimeUs;
 | 
			
		||||
    }
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
    frame->pkt_pts = frame->pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
    frame->pkt_dts = AV_NOPTS_VALUE;
 | 
			
		||||
    frame->color_range = avctx->color_range;
 | 
			
		||||
    frame->color_primaries = avctx->color_primaries;
 | 
			
		||||
@ -386,11 +381,6 @@ static int mediacodec_wrap_sw_buffer(AVCodecContext *avctx,
 | 
			
		||||
    } else {
 | 
			
		||||
        frame->pts = info->presentationTimeUs;
 | 
			
		||||
    }
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
    frame->pkt_pts = frame->pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
    frame->pkt_dts = AV_NOPTS_VALUE;
 | 
			
		||||
 | 
			
		||||
    av_log(avctx, AV_LOG_TRACE,
 | 
			
		||||
 | 
			
		||||
@ -656,11 +656,6 @@ static int ffmal_copy_frame(AVCodecContext *avctx,  AVFrame *frame,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    frame->pts = buffer->pts == MMAL_TIME_UNKNOWN ? AV_NOPTS_VALUE : buffer->pts;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
    frame->pkt_pts = frame->pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
    frame->pkt_dts = AV_NOPTS_VALUE;
 | 
			
		||||
 | 
			
		||||
done:
 | 
			
		||||
 | 
			
		||||
@ -544,11 +544,6 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
 | 
			
		||||
 | 
			
		||||
        outsurf = &out_frame->surface;
 | 
			
		||||
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
        frame->pkt_pts = outsurf->Data.TimeStamp;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
        frame->pts = outsurf->Data.TimeStamp;
 | 
			
		||||
 | 
			
		||||
        frame->repeat_pict =
 | 
			
		||||
 | 
			
		||||
@ -1572,11 +1572,6 @@ static int vp9_decode_frame(AVCodecContext *avctx, void *frame,
 | 
			
		||||
        if ((ret = av_frame_ref(frame, s->s.refs[ref].f)) < 0)
 | 
			
		||||
            return ret;
 | 
			
		||||
        ((AVFrame *)frame)->pts = pkt->pts;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
        ((AVFrame *)frame)->pkt_pts = pkt->pts;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
        ((AVFrame *)frame)->pkt_dts = pkt->dts;
 | 
			
		||||
        for (i = 0; i < 8; i++) {
 | 
			
		||||
            if (s->next_refs[i].f->buf[0])
 | 
			
		||||
 | 
			
		||||
@ -72,11 +72,6 @@ static void get_frame_defaults(AVFrame *frame)
 | 
			
		||||
 | 
			
		||||
    frame->pts                   =
 | 
			
		||||
    frame->pkt_dts               = AV_NOPTS_VALUE;
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
FF_DISABLE_DEPRECATION_WARNINGS
 | 
			
		||||
    frame->pkt_pts               = AV_NOPTS_VALUE;
 | 
			
		||||
FF_ENABLE_DEPRECATION_WARNINGS
 | 
			
		||||
#endif
 | 
			
		||||
    frame->best_effort_timestamp = AV_NOPTS_VALUE;
 | 
			
		||||
    frame->pkt_duration        = 0;
 | 
			
		||||
    frame->pkt_pos             = -1;
 | 
			
		||||
@ -292,11 +287,6 @@ 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;
 | 
			
		||||
 | 
			
		||||
@ -399,15 +399,6 @@ typedef struct AVFrame {
 | 
			
		||||
     */
 | 
			
		||||
    int64_t pts;
 | 
			
		||||
 | 
			
		||||
#if FF_API_PKT_PTS
 | 
			
		||||
    /**
 | 
			
		||||
     * PTS copied from the AVPacket that was decoded to produce this frame.
 | 
			
		||||
     * @deprecated use the pts field instead
 | 
			
		||||
     */
 | 
			
		||||
    attribute_deprecated
 | 
			
		||||
    int64_t pkt_pts;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * DTS copied from the AVPacket that triggered returning this frame. (if frame threading isn't used)
 | 
			
		||||
     * This is also the Presentation time of this AVFrame calculated from
 | 
			
		||||
 | 
			
		||||
@ -105,9 +105,6 @@
 | 
			
		||||
 * @{
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef FF_API_PKT_PTS
 | 
			
		||||
#define FF_API_PKT_PTS                  (LIBAVUTIL_VERSION_MAJOR < 57)
 | 
			
		||||
#endif
 | 
			
		||||
#ifndef FF_API_CRYPTO_SIZE_T
 | 
			
		||||
#define FF_API_CRYPTO_SIZE_T            (LIBAVUTIL_VERSION_MAJOR < 57)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user