Commit b8facbee authored by Marton Balint's avatar Marton Balint

ffplay: only do early frame drop if video queue is not empty

Fixes ticket #2446.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent d148339d
......@@ -1694,7 +1694,8 @@ static int get_video_frame(VideoState *is, AVFrame *frame, AVPacket *pkt, int *s
double ptsdiff = dpts - is->frame_last_pts;
if (!isnan(clockdiff) && fabs(clockdiff) < AV_NOSYNC_THRESHOLD &&
!isnan(ptsdiff) && ptsdiff > 0 && ptsdiff < AV_NOSYNC_THRESHOLD &&
clockdiff + ptsdiff - is->frame_last_filter_delay < 0) {
clockdiff + ptsdiff - is->frame_last_filter_delay < 0 &&
is->videoq.nb_packets) {
is->frame_last_dropped_pos = pkt->pos;
is->frame_last_dropped_pts = dpts;
is->frame_last_dropped_serial = *serial;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment