Fix default sizes on readers without MAX_WIDTH and MAX_HEIGHT settings (#188)

This commit is contained in:
Jonathan Thomas
2019-01-22 22:14:30 -06:00
committed by GitHub
parent 7b6eb9c21b
commit f009b0f46c
2 changed files with 8 additions and 0 deletions

View File

@@ -892,7 +892,11 @@ void FFmpegReader::ProcessVideoPacket(int64_t requested_frame)
// method will scale it back to timeline size before scaling it smaller again. This needs to be fixed in
// the future.
int max_width = Settings::Instance()->MAX_WIDTH;
if (max_width <= 0)
max_width = info.width;
int max_height = Settings::Instance()->MAX_HEIGHT;
if (max_height <= 0)
max_height = info.height;
Clip* parent = (Clip*) GetClip();
if (parent) {