[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-datatype-cvs
Subject: [Datatype-cvs] flash/flv/fileformat flv_file_format.cpp,1.37,1.38
From: xiaochengli () helixcommunity ! org
Date: 2011-09-29 3:39:30
Message-ID: 201109290443.p8T4hkme015264 () mailer ! progressive-comp ! com
[Download RAW message or body]
Update of /cvsroot/datatype/flash/flv/fileformat
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv21874
Modified Files:
flv_file_format.cpp
Log Message:
Synopsis:
=========
This CR is to reverse part of a previous change from client dev in \
flv_file_format.cpp, it makes server seek/bookmarking fail.
Branch: HEAD
Reviewed by: Chytanya
Description:
=========
The root cause is seek will cause read unexpected 0 bytes from file. SeekDone and \
SeekSearchReadDone will use m_ulFLVTagReadSize as read requested bytes. \
m_ulFLVTagReadSize is set by: m_ulFLVTagReadSize = HX_FLV_TAG_HEADER_SIZE + \
m_ulFLVTagReadAhead; And m_ulFLVTagReadAhead is set by: m_ulFLVTagReadAhead = \
m_pPayloadFmt->GetFLVTagReadAhead(); But here the behavior of GetFLVTagReadAhead in \
CRTMPPayload and CFLVPayload is different. One returns 0 but another returns 1. So \
read request for seeking on server is set to 15 by m_ulFLVTagReadSize but 16 is \
expected.
It won't reverse other part of the previous check-in.
Files affected:
=========
datatype/flash/flv/fileformat/flv_file_format.cpp
Testing Performed:
=========
Unit Tests: N/A
Integration Tests: Tested on private build with a flash player, use manually seek and \
bookmark seek, player work well.
Leak Tests: None
Performance Tests: N/A
Platforms Tested: win-x86_64-vc10
Builds Verified: win-x86_64-vc10
QA Hints
========
None.
Index: flv_file_format.cpp
===================================================================
RCS file: /cvsroot/datatype/flash/flv/fileformat/flv_file_format.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- flv_file_format.cpp 13 Sep 2011 07:02:17 -0000 1.37
+++ flv_file_format.cpp 29 Sep 2011 03:39:27 -0000 1.38
@@ -1424,10 +1424,10 @@
if (SUCCEEDED(status))
{
// Did we read enough bytes?
- if (pBuffer && pBuffer->GetSize() == m_ulFLVTagReadSize )
+ if (pBuffer && pBuffer->GetSize() == HX_FLV_TAG_HEADER_SIZE + 1)
{
// Compute the file offset of the beginning of the tag
- UINT32 ulTagFileOffset = m_ulFileOffset - m_ulFLVTagReadSize;
+ UINT32 ulTagFileOffset = m_ulFileOffset - HX_FLV_TAG_HEADER_SIZE - 1;
// Parse the tag header
BYTE* pBuf = pBuffer->GetBuffer();
UINT32 ulLen = pBuffer->GetSize();
@@ -1807,12 +1807,12 @@
// Set the state
m_ulState = kStateSeekSearchReadDonePending;
// Save the number of read bytes requested
- m_ulReadBytesRequested = m_ulFLVTagReadSize;
+ m_ulReadBytesRequested = HX_FLV_TAG_HEADER_SIZE + 1;
// Read HX_FLV_TAG_HEADER_SIZE plus one bytes
// Always read an extra byte while scanning for a seek point,
// we need to check the VIDEODATA header (on video packets) to
// look for a key frame
- m_pFileObject->Read(m_ulFLVTagReadSize);
+ m_pFileObject->Read(HX_FLV_TAG_HEADER_SIZE + 1);
}
else
{
_______________________________________________
Datatype-cvs mailing list
Datatype-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/datatype-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic