[RIO-7802] MP3 duration is not calculated when there is a CPM plugin
diff --git a/fileformats/mp3/parser/src/mp3parser.cpp b/fileformats/mp3/parser/src/mp3parser.cpp
index a060d79..419cabd 100644
--- a/fileformats/mp3/parser/src/mp3parser.cpp
+++ b/fileformats/mp3/parser/src/mp3parser.cpp
@@ -438,7 +438,7 @@
// SAVE THE CURRENT FILE POSITION
errCode = MP3Utils::SeektoOffset(fp, 0, Oscl_File::SEEKSET);
// try to retrieve the file size
- if (fp->GetCPM() == NULL && MP3Utils::getCurrentFileSize(fp, iLocalFileSize))
+ if (fp->GetFileBufferingCapacity() == 0 && MP3Utils::getCurrentFileSize(fp, iLocalFileSize))
{
iLocalFileSizeSet = true;
iInitSearchFileSize = OSCL_MIN(iInitSearchFileSize, iLocalFileSize);
@@ -758,7 +758,7 @@
if (fpUsed->Read(pFrameHeader, 1, MP3_FRAME_HEADER_SIZE) != MP3_FRAME_HEADER_SIZE)
{
- if (fpUsed->GetCPM() == NULL)
+ if (fpUsed->GetFileBufferingCapacity() == 0)
{
iDurationScanComplete = true;
}
@@ -1362,7 +1362,7 @@
uint32 clipDuration = 0;
// local clip playback
- if (!fp->GetCPM())
+ if (fp->GetFileBufferingCapacity() == 0)
{
// if scanning is complete, send the clip duration from scan
// else if vbri/xing headers exist send duration from that
@@ -1795,7 +1795,7 @@
{
uint32 SeekPosition = 0;
SeekPosition = SeekPointFromTimestamp(timestampInMsec);
- if (!((!fp->GetCPM()) && (SeekPosition == iLocalFileSize) && (timestampInMsec == iClipDurationInMsec)))
+ if (!((fp->GetFileBufferingCapacity() == 0) && (SeekPosition == iLocalFileSize) && (timestampInMsec == iClipDurationInMsec)))
{
SeekPosition += StartOffset;
}
@@ -1926,7 +1926,7 @@
* calculated on the basis of average bit rate
**/
int32 avgBR = 0;
- if (fp->GetCPM())
+ if (fp->GetFileBufferingCapacity() > 0)
{
avgBR = iAvgBitrateInbps;
}
@@ -1950,7 +1950,7 @@
* Since in PD/PS scenarios we might not be having enough data to find the seek point
* We can find the seek point when we are resuming the playback
**/
- if (seekPoint > 0 && !fp->GetCPM())
+ if (seekPoint > 0 && fp->GetFileBufferingCapacity() == 0)
{
// seek to the reposition point location
MP3Utils::SeektoOffset(fp, seekPoint + StartOffset, Oscl_File::SEEKSET);
@@ -2015,7 +2015,7 @@
syncOffset = 0;
iMaxSyncBufferSize = 627; /* default for 192 kbps, 44.1 kHz */
- if (aFile->GetCPM() != NULL)
+ if (aFile->GetFileBufferingCapacity() > 0)
{
iLocalFileSizeSet = (int32)MP3Utils::getCurrentFileSize(aFile, iLocalFileSize);
}