summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2010-01-09 19:53:17 (GMT)
committerChristian Gmeiner <christian.gmeiner@gmail.com>2010-01-09 19:53:17 (GMT)
commit7ebd290822891494ce536126a2ee446bcd69876e (patch)
treecee2f08545efdc3e1eb302e5a9def60ecc9cf87a
parent2c2988b4a7afd8f049f2b7ac8a793a6f390b7cf7 (diff)
downloadvdr-plugin-dxr3-7ebd290822891494ce536126a2ee446bcd69876e.tar.gz
vdr-plugin-dxr3-7ebd290822891494ce536126a2ee446bcd69876e.tar.bz2
there is no need for m_count variable
-rw-r--r--dxr3syncbuffer.c5
-rw-r--r--dxr3syncbuffer.h3
2 files changed, 3 insertions, 5 deletions
diff --git a/dxr3syncbuffer.c b/dxr3syncbuffer.c
index 33843a2..db6475f 100644
--- a/dxr3syncbuffer.c
+++ b/dxr3syncbuffer.c
@@ -59,9 +59,8 @@ void cFixedLengthFrame::CopyFrame(const uint8_t* pStart, int length)
if (length > m_length) {
delete[] m_pData;
m_pData = new uint8_t[length];
- m_length = length;
}
- m_count = length;
+ m_length = length;
memcpy((void*) m_pData, (void*) pStart, length);
}
@@ -74,7 +73,7 @@ uint8_t* cFixedLengthFrame::GetData(void)
// ==================================
int cFixedLengthFrame::GetCount(void)
{
- return m_count;
+ return m_length;
}
// ==================================
diff --git a/dxr3syncbuffer.h b/dxr3syncbuffer.h
index 9b84abd..49ed8c6 100644
--- a/dxr3syncbuffer.h
+++ b/dxr3syncbuffer.h
@@ -38,7 +38,7 @@ const uint32_t UNKNOWN_ASPECT_RATIO = 0xFFFFFFFF;
class cFixedLengthFrame : private Uncopyable {
public:
cFixedLengthFrame() : samplerate(UNKNOWN_DATA_RATE), channels(UNKNOWN_CHANNEL_COUNT), aspectratio(UNKNOWN_ASPECT_RATIO),
- pts(0), m_count(0), m_length(0)
+ pts(0), m_length(0)
{}
~cFixedLengthFrame();
@@ -56,7 +56,6 @@ public:
private:
uint8_t* m_pData;
- int m_count;
int m_length;
};