History

Schedule refreshes from a thread that actually knows the PTS. Fixes wernfried_1.avi

Originally committed as revision 21586 to svn://svn.ffmpeg.org/ffmpeg/trunk

Michael Niedermayer committed 16 years ago

Commit b8bb3981 parent 68aefbe1 file · +2 −5Browse files

Unified · Split

ffplay.c+2−5
@@ -1061,8 +1061,7 @@ static void video_refresh_timer(void *opaque) · 1060 unmodified lines
10611061
10621062 if (is->video_st) {
10631063 if (is->pictq_size == 0) {
1064− /* if no picture, need to wait */
1065− schedule_refresh(is, 1);
1064+// fprintf(stderr, "Internal error detected in the SDL timer\n");
10661065 } else {
10671066 /* dequeue the picture */
10681067 vp = &is->pictq[is->pictq_rindex];
@@ -1071,9 +1070,6 @@ static void video_refresh_timer(void *opaque) · 2 unmodified lines
10711070 is->video_current_pts = vp->pts;
10721071 is->video_current_pts_drift = is->video_current_pts - av_gettime() / 1000000.0;
10731072
1074− /* launch timer for next picture */
1075− schedule_refresh(is, (int)(compute_frame_delay(vp->pts, is) * 1000 + 0.5));
1076−
10771073 if(is->subtitle_st) {
10781074 if (is->subtitle_stream_changed) {
10791075 SDL_LockMutex(is->subpq_mutex);
@@ -1282,6 +1278,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts) · 202 unmodified lines
12821278 SDL_LockMutex(is->pictq_mutex);
12831279 is->pictq_size++;
12841280 SDL_UnlockMutex(is->pictq_mutex);
1281+ schedule_refresh(is, (int)(compute_frame_delay(vp->pts, is) * 1000 + 0.5));
12851282 }
12861283 return 0;
12871284 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t