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

Stefano Sabatini stefano.sabatini-lala
Sun Jan 16 18:39:34 CET 2011


---
 ffplay.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 840df66..8c06991 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1575,10 +1575,13 @@ static int get_video_frame(VideoState *is, AVFrame *frame, int64_t *pts, AVPacke
                                  pkt);
 
     if (got_picture) {
+
+        av_log(NULL, AV_LOG_DEBUG, "pkt_pts:%"PRId64" reordered_opaque:%"PRId64"\n",
+               frame->pkt_pts, frame->reordered_opaque);
         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


--RpqchZ26BWispMcB--



More information about the ffmpeg-devel mailing list