From: PacketVideo CM Date: Wed, 4 Nov 2009 17:40:55 +0000 (-0800) Subject: RIO-7892: WAV file duration parsing fix X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d55fdd772585146d0e290bc4d3d064c6337baf59;p=android-x86%2Fexternal-opencore.git RIO-7892: WAV file duration parsing fix --- diff --git a/engines/2way/src/pv_2way_sdkinfo.h b/engines/2way/src/pv_2way_sdkinfo.h index 37a47796..80ca767c 100644 --- a/engines/2way/src/pv_2way_sdkinfo.h +++ b/engines/2way/src/pv_2way_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PV2WAY_ENGINE_SDKINFO_LABEL "1051372" +#define PV2WAY_ENGINE_SDKINFO_LABEL "1052164" #define PV2WAY_ENGINE_SDKINFO_DATE 0x20091029 #endif //PV_2WAY_SDKINFO_H_INCLUDED diff --git a/engines/author/src/pv_author_sdkinfo.h b/engines/author/src/pv_author_sdkinfo.h index c06f9263..d7284480 100644 --- a/engines/author/src/pv_author_sdkinfo.h +++ b/engines/author/src/pv_author_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1051372" +#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1052164" #define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20091029 #endif //PV_AUTHOR_SDKINFO_H_INCLUDED diff --git a/engines/player/src/pv_player_sdkinfo.h b/engines/player/src/pv_player_sdkinfo.h index 5d95309f..f32de3b1 100644 --- a/engines/player/src/pv_player_sdkinfo.h +++ b/engines/player/src/pv_player_sdkinfo.h @@ -21,7 +21,7 @@ // This header file is automatically generated at build-time // *** OFFICIAL RELEASE INFO -- Will not auto update -#define PVPLAYER_ENGINE_SDKINFO_LABEL "1051372" +#define PVPLAYER_ENGINE_SDKINFO_LABEL "1052164" #define PVPLAYER_ENGINE_SDKINFO_DATE 0x20091029 #endif //PV_PLAYER_SDKINFO_H_INCLUDED diff --git a/nodes/pvwavffparsernode/src/pvmf_wavffparser_node.cpp b/nodes/pvwavffparsernode/src/pvmf_wavffparser_node.cpp index 5a2774ce..e247c5ac 100644 --- a/nodes/pvwavffparsernode/src/pvmf_wavffparser_node.cpp +++ b/nodes/pvwavffparsernode/src/pvmf_wavffparser_node.cpp @@ -1235,7 +1235,7 @@ PVMFStatus PVMFWAVFFParserNode::GetMediaPresentationInfo(PVMFMediaPresentationIn uint32 duration_sec = wavinfo.NumSamples / wavinfo.SampleRate; uint32 duration_msec = wavinfo.NumSamples % wavinfo.SampleRate; - uint32 duration = (duration_msec * 1000) / wavinfo.NumSamples + duration_sec * 1000 ; + uint32 duration = (duration_msec * 1000) / wavinfo.SampleRate + duration_sec * 1000 ; aInfo.setDurationValue(duration); // Current version of WAV parser is limited to 1 channel @@ -1389,7 +1389,7 @@ PVMFStatus PVMFWAVFFParserNode::DoSetDataSourcePosition() // see if targetNPT is greater than or equal to clip duration. uint32 duration_sec = wavinfo.NumSamples / wavinfo.SampleRate; uint32 duration_msec = wavinfo.NumSamples % wavinfo.SampleRate; - uint32 duration = (duration_msec * 1000) / wavinfo.NumSamples + duration_sec * 1000 ; + uint32 duration = (duration_msec * 1000) / wavinfo.SampleRate + duration_sec * 1000 ; uint32 tempTargetNPT = targetNPT; if (tempTargetNPT >= duration) { @@ -1902,7 +1902,7 @@ PVMFStatus PVMFWAVFFParserNode::DoGetNodeMetadataValue() { uint32 duration_sec = wavinfo.NumSamples / wavinfo.SampleRate; uint32 duration_msec = wavinfo.NumSamples % wavinfo.SampleRate; - uint32 duration = (duration_msec * 1000) / wavinfo.NumSamples + duration_sec * 1000 ; + uint32 duration = (duration_msec * 1000) / wavinfo.SampleRate + duration_sec * 1000 ; KeyVal.value.uint32_value = duration; } // Set the length and capacity