From 0f07334126048f16cf631e72e8708c2bf3c8a8e6 Mon Sep 17 00:00:00 2001 From: deva Date: Thu, 15 Jun 2006 20:18:21 +0000 Subject: Fixed the last pieces of the YUV drawin on the client, as well as a couple of huge memory leaks. --- client/decoder.cc | 10 +++++++++- client/player.cc | 3 --- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'client') diff --git a/client/decoder.cc b/client/decoder.cc index c7a5097..ebd5087 100644 --- a/client/decoder.cc +++ b/client/decoder.cc @@ -75,6 +75,11 @@ void Decoder::run() if(!dvframe) continue; // An empty frame Frame *yuvframe = dvdecoder.decode(dvframe); // Decode the DV frame to YUV422 and PCM audio + + if(dvframe->vframe) delete dvframe->vframe; + if(dvframe->aframe) delete dvframe->aframe; + delete dvframe; + if(!yuvframe) continue; // An error ocurred if(MIaV::control.isFrozen() == false) { @@ -126,7 +131,10 @@ void Decoder::run() sendersmutex.unlock(); - // free(frame); + if(yuvframe->vframe) delete yuvframe->vframe; + if(yuvframe->aframe) delete yuvframe->aframe; + delete yuvframe; + newconnection = true; } diff --git a/client/player.cc b/client/player.cc index dc3002d..3485a27 100644 --- a/client/player.cc +++ b/client/player.cc @@ -41,13 +41,10 @@ Player::Player(QWidget *w, Decoder *d) : Player::~Player() { - // delete dvdecoder; } void Player::show_frame() { - // char *frame; - decoder->pframeAcquire(); // Acquire frame data // Scale the video in aspect: -- cgit v1.2.3