AVCodecEncoder: Solve a crash at personalStudio startup
* This makes the app to start, but it's not enough to have it show the window.
This commit is contained in:
@@ -301,11 +301,14 @@ AVCodecEncoder::_Setup()
|
|||||||
fContext->width = fInputFormat.u.raw_video.display.line_width;
|
fContext->width = fInputFormat.u.raw_video.display.line_width;
|
||||||
fContext->height = fInputFormat.u.raw_video.display.line_count;
|
fContext->height = fInputFormat.u.raw_video.display.line_count;
|
||||||
fContext->gop_size = 12;
|
fContext->gop_size = 12;
|
||||||
|
|
||||||
// TODO: Fix pixel format or setup conversion method...
|
// TODO: Fix pixel format or setup conversion method...
|
||||||
for (int i = 0; fCodec->pix_fmts[i] != PIX_FMT_NONE; i++) {
|
if (fCodec->pix_fmts != NULL) {
|
||||||
// Use the last supported pixel format, which we hope is the
|
for (int i = 0; fCodec->pix_fmts[i] != PIX_FMT_NONE; i++) {
|
||||||
// one with the best quality.
|
// Use the last supported pixel format, which we hope is the
|
||||||
fContext->pix_fmt = fCodec->pix_fmts[i];
|
// one with the best quality.
|
||||||
|
fContext->pix_fmt = fCodec->pix_fmts[i];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Setup rate control:
|
// TODO: Setup rate control:
|
||||||
|
|||||||
Reference in New Issue
Block a user