[FFmpeg-cvslog] ffplay: allow frame dropping if we redisplay an already displayed frame
Marton Balint
git at videolan.org
Thu Feb 28 01:48:43 CET 2013
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Feb 16 14:24:34 2013 +0100| [38f649662c12c0d23d1be6f066c6ca597f6c1cbb] | committer: Marton Balint
ffplay: allow frame dropping if we redisplay an already displayed frame
Signed-off-by: Marton Balint <cus at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38f649662c12c0d23d1be6f066c6ca597f6c1cbb
---
ffplay.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/ffplay.c b/ffplay.c
index 0d4fde6..b4394e3 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1307,8 +1307,9 @@ static void video_refresh(void *opaque, double *remaining_time)
}
if (is->video_st) {
+ int redisplay = 0;
if (is->force_refresh)
- pictq_prev_picture(is);
+ redisplay = pictq_prev_picture(is);
retry:
if (is->pictq_size == 0) {
SDL_LockMutex(is->pictq_mutex);
@@ -1325,6 +1326,7 @@ retry:
if (vp->serial != is->videoq.serial) {
pictq_next_picture(is);
+ redisplay = 0;
goto retry;
}
@@ -1355,9 +1357,11 @@ retry:
if (is->pictq_size > 1) {
VideoPicture *nextvp = &is->pictq[(is->pictq_rindex + 1) % VIDEO_PICTURE_QUEUE_SIZE];
duration = nextvp->pts - vp->pts;
- if(!is->step && (framedrop>0 || (framedrop && get_master_sync_type(is) != AV_SYNC_VIDEO_MASTER)) && time > is->frame_timer + duration){
- is->frame_drops_late++;
+ if(!is->step && (redisplay || framedrop>0 || (framedrop && get_master_sync_type(is) != AV_SYNC_VIDEO_MASTER)) && time > is->frame_timer + duration){
+ if (!redisplay)
+ is->frame_drops_late++;
pictq_next_picture(is);
+ redisplay = 0;
goto retry;
}
}
More information about the ffmpeg-cvslog
mailing list