forked from mia/Aegisub
FFmpegSource2: the mandatory fixing
Originally committed to SVN as r2333.
This commit is contained in:
parent
3338b6471b
commit
9bc1f9b4d7
1 changed files with 2 additions and 3 deletions
|
@ -117,9 +117,8 @@ AVFrame *GetFrameByTime(double Time, char *ErrorMsg, unsigned MsgSize) {
|
||||||
|
|
||||||
int VideoBase::SetOutputFormat(int TargetFormats, int Width, int Height) {
|
int VideoBase::SetOutputFormat(int TargetFormats, int Width, int Height) {
|
||||||
int Loss;
|
int Loss;
|
||||||
int OutputFormat = avcodec_find_best_pix_fmt((1 << PIX_FMT_YUVJ420P)
|
int OutputFormat = avcodec_find_best_pix_fmt(TargetFormats,
|
||||||
| (1 << PIX_FMT_YUV420P) | (1 << PIX_FMT_YUYV422) | (1 << PIX_FMT_RGB32)
|
CodecContext->pix_fmt, 1 /* Required to prevent pointless RGB32 => RGB24 conversion */, &Loss);
|
||||||
| (1 << PIX_FMT_BGR24), CodecContext->pix_fmt, 1 /* Required to prevent pointless RGB32 => RGB24 conversion */, &Loss);
|
|
||||||
if (OutputFormat == -1)
|
if (OutputFormat == -1)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue