Author: fejj
Date: 2007-08-30 11:57:50 -0400 (Thu, 30 Aug 2007)
New Revision: 85059
Modified:
trunk/moon/src/ChangeLog
trunk/moon/src/mplayer.cpp
Log:
2007-08-30 Jeffrey Stedfast <[EMAIL PROTECTED]>
* mplayer.cpp (AdvanceFrame): If there is no video stream, return
based on audio state. Also, if current_pts >= target_pts already,
return true rather than false to pretend we advanced a frame (it's
really not that important to our caller, all the value is used for
is updating position).
Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog 2007-08-30 15:54:39 UTC (rev 85058)
+++ trunk/moon/src/ChangeLog 2007-08-30 15:57:50 UTC (rev 85059)
@@ -1,3 +1,11 @@
+2007-08-30 Jeffrey Stedfast <[EMAIL PROTECTED]>
+
+ * mplayer.cpp (AdvanceFrame): If there is no video stream, return
+ based on audio state. Also, if current_pts >= target_pts already,
+ return true rather than false to pretend we advanced a frame (it's
+ really not that important to our caller, all the value is used for
+ is updating position).
+
2007-08-30 Sebastien Pouliot <[EMAIL PROTECTED]>
* shape.cpp: Handle negative values for Height and Width (not
Modified: trunk/moon/src/mplayer.cpp
===================================================================
--- trunk/moon/src/mplayer.cpp 2007-08-30 15:54:39 UTC (rev 85058)
+++ trunk/moon/src/mplayer.cpp 2007-08-30 15:57:50 UTC (rev 85059)
@@ -402,7 +402,6 @@
AVFrame *frame = NULL;
bool advanced = false;
uint64_t target_pts;
- int skipped = 0;
int redraw = 0;
Packet *pkt;
@@ -426,12 +425,17 @@
this->target_pts = target_pts;
} else {
+ if (video->stream_id == -1) {
+ // No video, return false if we've reached the end of
the audio or true otherwise
+ return !MediaEnded ();
+ }
+
// use target_pts as set by audio thread
target_pts = this->target_pts;
}
if (current_pts >= target_pts)
- return false;
+ return true;
while ((pkt = (Packet *) g_async_queue_try_pop (video->queue))) {
// always decode the frame or we get glitches in the screen
@@ -447,15 +451,11 @@
break;
}
- skipped++;
-
// we are lagging behind, drop this frame
av_free (frame);
frame = NULL;
}
- printf ("skipped %d frames\n", skipped);
-
if (redraw) {
convert_to_rgb (video, frame);
advanced = true;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches