~ubuntu-branches/ubuntu/breezy/kdemultimedia/breezy

« back to all changes in this revision

Viewing changes to mpeglib/lib/input/simpleRingBuffer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-03-24 04:48:58 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050324044858-8ff88o9jxej6ii3d
Tags: 4:3.4.0-0ubuntu3
Add kubuntu_02_hide_arts_menu_entries.diff to hide artsbuilder and artscontrol k-menu entries

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#include "simpleRingBuffer.h"
17
17
#include <string.h>
18
18
 
 
19
#include <iostream>
 
20
 
 
21
using namespace std;
 
22
 
19
23
static int instanceCnt=0;
20
24
 
21
25
SimpleRingBuffer::SimpleRingBuffer(int size,int minLinSize) {
26
30
  instance=instanceCnt;
27
31
  instanceCnt++;
28
32
  this->size=size;
29
 
  startPos=new char[size];
 
33
  startPos=(char*)malloc(size);
30
34
  readPos=startPos;
31
35
  writePos=startPos;
32
36
  lockPos=startPos;
58
62
SimpleRingBuffer::~SimpleRingBuffer() {
59
63
  // The user of this class must take care that the threads
60
64
  // have exited!
61
 
  delete startPos;
62
 
  delete minLinBuf;
 
65
  free(startPos);
 
66
  delete [] minLinBuf;
63
67
  abs_thread_mutex_destroy(&mut);
64
68
  abs_thread_cond_destroy(&dataCond);
65
69
  abs_thread_cond_destroy(&spaceCond);