diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-12-17 19:42:55 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2010-12-17 19:42:55 +0300 |
commit | 7359bd509afa235acc2ac2f7f95fc9cb5cafd1a4 (patch) | |
tree | b5bb90eeca58fdeb9fde6825f21a25a319823cb4 /src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp | |
parent | d30b15ed4b98c28951d6d45b8928f4c2b6a11129 (diff) |
apply astyle formatting
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2786 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp')
-rw-r--r-- | src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp b/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp index 1f0240054..496efa659 100644 --- a/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp +++ b/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp @@ -1,7 +1,7 @@ #include "stdafx.h"
#include "Ap4AsyncReaderStream.h"
-AP4_AsyncReaderStream::AP4_AsyncReaderStream(CBaseSplitterFile* pFile)
+AP4_AsyncReaderStream::AP4_AsyncReaderStream(CBaseSplitterFile* pFile)
: m_refs(1)
, m_pFile(pFile)
{
@@ -15,45 +15,50 @@ AP4_AsyncReaderStream::~AP4_AsyncReaderStream() void AP4_AsyncReaderStream::AddReference()
{
- ASSERT(m_refs > 0);
+ ASSERT(m_refs > 0);
++m_refs;
}
void AP4_AsyncReaderStream::Release()
{
- ASSERT(m_refs > 0);
- if(--m_refs == 0) delete this;
+ ASSERT(m_refs > 0);
+ if(--m_refs == 0) {
+ delete this;
+ }
}
AP4_Result AP4_AsyncReaderStream::Read(void* buffer, AP4_Size bytesToRead, AP4_Size* bytesRead)
{
__int64 bytesAvail = m_pFile->GetRemaining();
- if(bytesAvail < bytesToRead)
- {
- if(bytesRead) *bytesRead = bytesAvail;
+ if(bytesAvail < bytesToRead) {
+ if(bytesRead) {
+ *bytesRead = bytesAvail;
+ }
bytesToRead = bytesAvail;
}
- if(bytesAvail == 0)
- {
+ if(bytesAvail == 0) {
return AP4_ERROR_EOS;
}
- if(FAILED(m_pFile->ByteRead((BYTE*)buffer, bytesToRead)))
- {
- if(bytesRead) *bytesRead = 0;
+ if(FAILED(m_pFile->ByteRead((BYTE*)buffer, bytesToRead))) {
+ if(bytesRead) {
+ *bytesRead = 0;
+ }
return AP4_ERROR_READ_FAILED;
}
- if(bytesRead) *bytesRead = bytesToRead;
+ if(bytesRead) {
+ *bytesRead = bytesToRead;
+ }
return AP4_SUCCESS;
}
AP4_Result AP4_AsyncReaderStream::Write(const void* buffer, AP4_Size bytesToWrite, AP4_Size* bytesWritten)
{
- return AP4_ERROR_WRITE_FAILED;
+ return AP4_ERROR_WRITE_FAILED;
}
AP4_Result AP4_AsyncReaderStream::Seek(AP4_Offset offset)
|