Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksoid <aleksoid@users.sourceforge.net>2010-08-16 08:26:13 +0400
committerAleksoid <aleksoid@users.sourceforge.net>2010-08-16 08:26:13 +0400
commit179ef519eb9395fb7ce23e01bee7bb8b00a77a2e (patch)
tree6b0248127bf12d6521e23edde809a391c2315d3c /src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp
parent44d134dcdbc2e4c23bd2170193b44e59e92936b8 (diff)
Add : PCM(SOWT, TWOS) sound support, ticket #242, #120;
Fix : [MP4] AAC sound stops playing, ticket #74; Fix : MPEG/TS splitter can't recognize some video track, ticket #465; This commit fixes ticket #242 465 74 git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@2249 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp')
-rw-r--r--src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp b/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp
index 2721e811d..1f0240054 100644
--- a/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp
+++ b/src/filters/parser/MP4Splitter/Ap4AsyncReaderStream.cpp
@@ -25,13 +25,13 @@ void AP4_AsyncReaderStream::Release()
if(--m_refs == 0) delete this;
}
-AP4_Result AP4_AsyncReaderStream::ReadPartial(void* buffer, AP4_Size bytesToRead, AP4_Size& bytesRead)
+AP4_Result AP4_AsyncReaderStream::Read(void* buffer, AP4_Size bytesToRead, AP4_Size* bytesRead)
{
- AP4_Size bytesAvail = (AP4_Size)m_pFile->GetRemaining();
+ __int64 bytesAvail = m_pFile->GetRemaining();
if(bytesAvail < bytesToRead)
{
- bytesRead = bytesAvail;
+ if(bytesRead) *bytesRead = bytesAvail;
bytesToRead = bytesAvail;
}
@@ -42,34 +42,34 @@ AP4_Result AP4_AsyncReaderStream::ReadPartial(void* buffer, AP4_Size bytesToRead
if(FAILED(m_pFile->ByteRead((BYTE*)buffer, bytesToRead)))
{
- bytesRead = 0;
+ if(bytesRead) *bytesRead = 0;
return AP4_ERROR_READ_FAILED;
}
- bytesRead = bytesToRead;
+ if(bytesRead) *bytesRead = bytesToRead;
return AP4_SUCCESS;
}
-AP4_Result AP4_AsyncReaderStream::WritePartial(const void* buffer, AP4_Size bytesToWrite, AP4_Size& bytesWritten)
+AP4_Result AP4_AsyncReaderStream::Write(const void* buffer, AP4_Size bytesToWrite, AP4_Size* bytesWritten)
{
return AP4_ERROR_WRITE_FAILED;
}
-AP4_Result AP4_AsyncReaderStream::Seek(AP4_Position offset)
+AP4_Result AP4_AsyncReaderStream::Seek(AP4_Offset offset)
{
m_pFile->Seek(offset);
return m_pFile->GetPos() == offset ? AP4_SUCCESS : AP4_FAILURE;
}
-AP4_Result AP4_AsyncReaderStream::Tell(AP4_Position& offset)
+AP4_Result AP4_AsyncReaderStream::Tell(AP4_Offset& offset)
{
offset = (AP4_Offset)m_pFile->GetPos();
return AP4_SUCCESS;
}
-AP4_Result AP4_AsyncReaderStream::GetSize(AP4_LargeSize& size)
+AP4_Result AP4_AsyncReaderStream::GetSize(AP4_Size& size)
{
- size = m_pFile->GetLength();
+ size = (AP4_Size)m_pFile->GetLength();
return AP4_SUCCESS;
} \ No newline at end of file