Fix crash introduced as a last minute change... need to
find a way to do this properly, though. The pixel format selected by AVCodecEncoder should match here. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39037 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
db1b905e37
commit
bb188e4d73
@ -153,9 +153,10 @@ AVFormatWriter::StreamCookie::Init(media_format* format,
|
||||
// Use the last supported pixel format of the AVCodec, which we hope
|
||||
// is the one with the best quality (true for all currently supported
|
||||
// encoders).
|
||||
AVCodec* codec = fStream->codec->codec;
|
||||
for (int i = 0; codec->pix_fmts[i] != PIX_FMT_NONE; i++)
|
||||
fStream->codec->pix_fmt = codec->pix_fmts[i];
|
||||
// AVCodec* codec = fStream->codec->codec;
|
||||
// for (int i = 0; codec->pix_fmts[i] != PIX_FMT_NONE; i++)
|
||||
// fStream->codec->pix_fmt = codec->pix_fmts[i];
|
||||
fStream->codec->pix_fmt = PIX_FMT_YUV420P;
|
||||
|
||||
} else if (format->type == B_MEDIA_RAW_AUDIO) {
|
||||
fStream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||
|
Loading…
Reference in New Issue
Block a user