OSDN Git Service

RIO-7892: WAV file duration parsing fix
authorPacketVideo CM <engbuild@pv.com>
Wed, 4 Nov 2009 17:40:55 +0000 (09:40 -0800)
committerPacketVideo CM <engbuild@pv.com>
Wed, 4 Nov 2009 17:40:55 +0000 (09:40 -0800)
engines/2way/src/pv_2way_sdkinfo.h
engines/author/src/pv_author_sdkinfo.h
engines/player/src/pv_player_sdkinfo.h
nodes/pvwavffparsernode/src/pvmf_wavffparser_node.cpp

index 37a4779..80ca767 100644 (file)
@@ -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
index c06f926..d728448 100644 (file)
@@ -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
index 5d95309..f32de3b 100644 (file)
@@ -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
index 5a2774c..e247c5a 100644 (file)
@@ -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