[FFmpeg-cvslog] ffplay: remove VideoPicture duration field

Marton Balint git at videolan.org
Sat Jun 2 17:09:17 CEST 2012


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun May 27 14:43:53 2012 +0200| [d872e1130092ba18f54131511d7ea64666878459] | committer: Marton Balint

ffplay: remove VideoPicture duration field

We are not using it.

Signed-off-by: Marton Balint <cus at passwd.hu>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d872e1130092ba18f54131511d7ea64666878459
---

 ffplay.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index 779c879..708dab8 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -99,7 +99,6 @@ typedef struct PacketQueue {
 
 typedef struct VideoPicture {
     double pts;                                  ///< presentation time stamp for this picture
-    double duration;                             ///< expected duration of the frame
     int64_t pos;                                 ///< byte position in file
     int skip;
     SDL_Overlay *bmp;
@@ -1194,13 +1193,8 @@ retry:
 
             if (is->pictq_size > 1) {
                 VideoPicture *nextvp = &is->pictq[(is->pictq_rindex + 1) % VIDEO_PICTURE_QUEUE_SIZE];
-                duration = nextvp->pts - vp->pts; // More accurate this way, 1/time_base is often not reflecting FPS
-            } else {
-                duration = vp->duration;
-            }
-
-            if((framedrop>0 || (framedrop && is->audio_st)) && time > is->frame_timer + duration){
-                if(is->pictq_size > 1){
+                duration = nextvp->pts - vp->pts;
+                if((framedrop>0 || (framedrop && is->audio_st)) && time > is->frame_timer + duration){
                     is->frame_drops_late++;
                     pictq_next_picture(is);
                     goto retry;
@@ -1387,8 +1381,6 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts1, int64_
 
     vp = &is->pictq[is->pictq_windex];
 
-    vp->duration = frame_delay;
-
     /* alloc or resize hardware picture buffer */
     if (!vp->bmp || vp->reallocate ||
         vp->width  != src_frame->width ||



More information about the ffmpeg-cvslog mailing list