Skip to content

Commit 674e06e

Browse files
committed
More accurate aspect detection for when mplayer is confused.
1 parent af056bc commit 674e06e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

trunk/mythtv/nuvinfo.pm

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,12 @@ package mythtv::nuvinfo;
227227
}
228228
# mplayer is confused and we need to detect the aspect on our own
229229
if ($info{'aspect'} =~ /^0.0/) {
230-
$info{'aspect'} = $info{'width'} / $info{'height'};
230+
if ($info{'height'} == 1088 || $info{'height'} == 720) {
231+
$info{'aspect'} = 16 / 9;
232+
}
233+
else {
234+
$info{'aspect'} = 4 / 3;
235+
}
231236
}
232237
# Cleanup
233238
$info{'aspect'} = aspect_str($info{'aspect'});
@@ -262,7 +267,7 @@ package mythtv::nuvinfo;
262267
return $w / $h;
263268
}
264269
# Parse out decimal formats
265-
if ($aspect == 1) { return 1; }
270+
if ($aspect eq '1') { return 1; }
266271
elsif ($aspect =~ m/^1.3/) { return 4 / 3; }
267272
elsif ($aspect =~ m/^1.7/) { return 16 / 9; }
268273
# Unknown aspect

0 commit comments

Comments
 (0)