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:
parent
671a2442d9
commit
0ed248f69d
|
@ -395,6 +395,18 @@ MediaConverterApp::_ConvertFile(BMediaFile* inFile, BMediaFile* outFile,
|
||||||
printf("fixing color space (B_RGBA32 -> B_RGB32)");
|
printf("fixing color space (B_RGBA32 -> B_RGB32)");
|
||||||
rvf->display.format = 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];
|
videoBuffer = new (nothrow) uint8[height * rvf->display.bytes_per_row];
|
||||||
outVidTrack = outFile->CreateTrack(&outVidFormat, videoCodec);
|
outVidTrack = outFile->CreateTrack(&outVidFormat, videoCodec);
|
||||||
|
|
Loading…
Reference in New Issue