File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ def testRewrapAudioPositiveOffset():
102
102
103
103
# check output duration
104
104
assert_equals ( src_audioStream .getDuration () + offset , dst_audioStream .getDuration () )
105
+ assert_equals ( src_audioStream .getNbSamples () + ( offset * dst_audioStream .getSampleRate () * dst_audioStream .getChannels () ), dst_audioStream .getNbSamples () )
105
106
106
107
107
108
def testRewrapAudioNegativeOffset ():
@@ -132,6 +133,7 @@ def testRewrapAudioNegativeOffset():
132
133
133
134
# check output duration
134
135
assert_almost_equals ( src_audioStream .getDuration () + offset , dst_audioStream .getDuration (), delta = 0.01 )
136
+ assert_equals ( src_audioStream .getNbSamples () + ( offset * dst_audioStream .getSampleRate () * dst_audioStream .getChannels () ), dst_audioStream .getNbSamples () )
135
137
136
138
137
139
def testTranscodeVideoPositiveOffset ():
@@ -222,6 +224,7 @@ def testRewrapVideoPositiveOffset():
222
224
223
225
# check output duration
224
226
assert_equals ( src_videoStream .getDuration () + offset , dst_videoStream .getDuration () )
227
+ assert_equals ( src_videoStream .getNbFrames () + ( offset * dst_videoStream .getFps () ), dst_videoStream .getNbFrames () )
225
228
226
229
227
230
def testRewrapVideoNegativeOffset ():
@@ -252,6 +255,7 @@ def testRewrapVideoNegativeOffset():
252
255
253
256
# check output duration
254
257
assert_equals ( src_videoStream .getDuration () + offset , dst_videoStream .getDuration () )
258
+ assert_equals ( src_videoStream .getNbFrames () + ( offset * dst_videoStream .getFps () ), dst_videoStream .getNbFrames () )
255
259
256
260
257
261
def testMultipleOffsetFromSameInputFile ():
You can’t perform that action at this time.
0 commit comments