summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/decoder.cc3
-rw-r--r--client/player.cc11
2 files changed, 10 insertions, 4 deletions
diff --git a/client/decoder.cc b/client/decoder.cc
index 48dc67d..ef2185c 100644
--- a/client/decoder.cc
+++ b/client/decoder.cc
@@ -108,7 +108,8 @@ bool Decoder::eventFilter(QObject *o, QEvent *e)
// printf("QUIT from: %p, this: %p, testing: %p\n", o, this, qApp->activeWindow());
if(qApp->activeWindow() == (QWidget*)o) { // Ignore close events from non top level widgets
running = false; // Tell the thread to stop.
- closesem.acquire(); // Wait for the thread to stop.
+ sleep(1);// Wait for the thread to stop. (The ugly way!)
+ // closesem.acquire(); // Wait for the thread to stop.
}
}
diff --git a/client/player.cc b/client/player.cc
index 608d53d..cb62de8 100644
--- a/client/player.cc
+++ b/client/player.cc
@@ -55,7 +55,12 @@ void Player::show_frame()
dvdecoder.decode(frame);
decoder->pframeRelease(); // Release frame data
- render.width = widget->width();
- render.height = widget->height();
- render.display(WIDTH, HEIGHT);
+ if(widget->width() / 4 < widget->height() / 3) {
+ render.width = widget->width();
+ render.height = render.width / 4 * 3;
+ } else {
+ render.height = widget->height();
+ render.width = render.height / 3 * 4;
+ }
+ render.display(WIDTH / 2, HEIGHT / 2);
}