This should transfer the display aspect ratio correctly...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32051 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-08-01 01:54:48 +00:00
parent 671a2442d9
commit 0ed248f69d
1 changed files with 12 additions and 0 deletions

View File

@ -395,6 +395,18 @@ MediaConverterApp::_ConvertFile(BMediaFile* inFile, BMediaFile* outFile,
printf("fixing color space (B_RGBA32 -> B_RGB32)");
rvf->display.format = B_RGB32;
}
// Transfer the display aspect ratio.
if (inFormat.type == B_MEDIA_ENCODED_VIDEO) {
rvf->pixel_width_aspect
= inFormat.u.encoded_video.output.pixel_width_aspect;
rvf->pixel_height_aspect
= inFormat.u.encoded_video.output.pixel_height_aspect;
} else {
rvf->pixel_width_aspect
= inFormat.u.raw_video.pixel_width_aspect;
rvf->pixel_height_aspect
= inFormat.u.raw_video.pixel_height_aspect;
}
videoBuffer = new (nothrow) uint8[height * rvf->display.bytes_per_row];
outVidTrack = outFile->CreateTrack(&outVidFormat, videoCodec);