File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/AvTranscoder/properties Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -334,9 +334,6 @@ size_t VideoProperties::getBitRate() const
334
334
return 0 ;
335
335
}
336
336
337
- if (getGopSize () <= 0 )
338
- return 0 ;
339
-
340
337
LOG_INFO (" Estimate the video bitrate from the first GOP." )
341
338
size_t gopFramesSize = 0 ;
342
339
for (size_t picture = 0 ; picture < _gopStructure.size (); ++picture)
@@ -562,6 +559,12 @@ void VideoProperties::analyseGopStructure(IProgress& progress)
562
559
563
560
// Returns at the beginning of the stream
564
561
const_cast <FormatContext*>(&_fileProperties->getFormatContext ())->seek (0 , AVSEEK_FLAG_BYTE);
562
+
563
+ // Check GOP size
564
+ if (_gopSize <= 0 )
565
+ {
566
+ throw std::runtime_error (" Invalid GOP size when decoding the first data." );
567
+ }
565
568
}
566
569
}
567
570
}
You can’t perform that action at this time.
0 commit comments