File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ def testVideoReaderCreateNewInputFile():
24
24
# read all frames and check their size
25
25
for i in xrange (0 , reader .getSourceVideoProperties ().getNbFrames ()):
26
26
frame = av .VideoFrame (reader .readNextFrame ())
27
- assert_equals ( frame .getSize (), reader .getOutputWidth () * reader .getOutputHeight () * reader .getOutputNbComponents () )
27
+ bytesPerPixel = reader .getOutputBitDepth () / 8
28
+ assert_equals ( frame .getSize (), reader .getOutputWidth () * reader .getOutputHeight () * bytesPerPixel )
28
29
29
30
# check if the next frame is empty
30
31
frame = av .VideoFrame (reader .readNextFrame ())
@@ -43,7 +44,8 @@ def testVideoReaderReferenceInputFile():
43
44
# read all frames and check their size
44
45
for i in xrange (0 , reader .getSourceVideoProperties ().getNbFrames ()):
45
46
frame = av .VideoFrame (reader .readNextFrame ())
46
- assert_equals ( frame .getSize (), reader .getOutputWidth () * reader .getOutputHeight () * reader .getOutputNbComponents () )
47
+ bytesPerPixel = reader .getOutputBitDepth () / 8
48
+ assert_equals ( frame .getSize (), reader .getOutputWidth () * reader .getOutputHeight () * bytesPerPixel )
47
49
48
50
# check if the next frame is empty
49
51
frame = av .VideoFrame (reader .readNextFrame ())
You can’t perform that action at this time.
0 commit comments