[FFmpeg-devel] [PATCH] In get_video_frame(), use frame->pkt_pts rather than the deprecated reordered_opaque API, which is deprecated for this specific use.

Måns Rullgård mans
Sun Jan 30 19:02:11 CET 2011


Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:

> From e967ddb90f76e3a5e8a310c5d6d844374aab63ed Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Sun, 16 Jan 2011 18:39:34 +0100
> Subject: [PATCH] In ffplay:get_video_frame(), use frame->pkt_pts rather than
>  reordered_opaque.
>
> AVCodecContext.reordered_opaque is deprecated for this specific use.
> ---
>  ffplay.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/ffplay.c b/ffplay.c
> index edc6097..1df3824 100644
> --- a/ffplay.c
> +++ b/ffplay.c
> @@ -1570,16 +1570,15 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
>          return 0;
>      }
>  
> -    is->video_st->codec->reordered_opaque = pkt->pts;
>      len1 = avcodec_decode_video2(is->video_st->codec,
>                                   frame, &got_picture,
>                                   pkt);
>  
>      if (got_picture) {
>          if (decoder_reorder_pts == -1) {
> -            *pts = guess_correct_pts(&is->pts_ctx, frame->reordered_opaque, pkt->dts);
> +            *pts = guess_correct_pts(&is->pts_ctx, frame->pkt_pts, pkt->dts);
>          } else if (decoder_reorder_pts) {
> -            *pts = frame->reordered_opaque;
> +            *pts = frame->pkt_pts;
>          } else {
>              *pts = pkt->dts;
>          }
> -- 
> 1.7.2.3

Looks good.  Is this ready to push now, or did I miss some patch that
needs to go in first?

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-devel mailing list