summaryrefslogtreecommitdiff
path: root/client/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/player.cc')
-rw-r--r--client/player.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/client/player.cc b/client/player.cc
index ba2250f..608d53d 100644
--- a/client/player.cc
+++ b/client/player.cc
@@ -29,9 +29,8 @@
#define WIDTH 720
#define HEIGHT 576
-static int num = 0;
-
-Player::Player(QWidget *w, Decoder *d)
+Player::Player(QWidget *w, Decoder *d) :
+ dvdecoder(DV::ColorBest)
{
widget = w;
decoder = d;
@@ -51,13 +50,10 @@ Player::~Player()
void Player::show_frame()
{
char *frame;
- fprintf(stderr, "Frame!%d\n", num++);
- frame = decoder->getFrame();
- if(frame) {
- dvdecoder.decode(frame);
- // free(frame);
- }
+ frame = decoder->pframeAcquire(); // Acquire frame data
+ dvdecoder.decode(frame);
+ decoder->pframeRelease(); // Release frame data
render.width = widget->width();
render.height = widget->height();