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:
parent
2d50879085
commit
7f3ca22e46
@ -301,11 +301,14 @@ AVCodecEncoder::_Setup()
|
||||
fContext->width = fInputFormat.u.raw_video.display.line_width;
|
||||
fContext->height = fInputFormat.u.raw_video.display.line_count;
|
||||
fContext->gop_size = 12;
|
||||
|
||||
// TODO: Fix pixel format or setup conversion method...
|
||||
for (int i = 0; fCodec->pix_fmts[i] != PIX_FMT_NONE; i++) {
|
||||
// Use the last supported pixel format, which we hope is the
|
||||
// one with the best quality.
|
||||
fContext->pix_fmt = fCodec->pix_fmts[i];
|
||||
if (fCodec->pix_fmts != NULL) {
|
||||
for (int i = 0; fCodec->pix_fmts[i] != PIX_FMT_NONE; i++) {
|
||||
// Use the last supported pixel format, which we hope is the
|
||||
// one with the best quality.
|
||||
fContext->pix_fmt = fCodec->pix_fmts[i];
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Setup rate control:
|
||||
|
Loading…
x
Reference in New Issue
Block a user