mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
Minor clarity fix.
This commit is contained in:
parent
7445e891a8
commit
1d9784608a
@ -158,15 +158,23 @@ static bool ffemu_init_audio(struct ff_audio_info *audio, struct ffemu_params *p
|
||||
static bool ffemu_init_video(struct ff_video_info *video, const struct ffemu_params *param)
|
||||
{
|
||||
AVCodec *codec = NULL;
|
||||
|
||||
if (g_settings.video.h264_record)
|
||||
{
|
||||
codec = avcodec_find_encoder_by_name("libx264rgb");
|
||||
// Older versions of FFmpeg have RGB encoding in libx264.
|
||||
if (!codec)
|
||||
codec = avcodec_find_encoder_by_name("libx264");
|
||||
|
||||
video->pix_fmt = PIX_FMT_BGR24;
|
||||
video->scaler.out_fmt = SCALER_FMT_BGR24;
|
||||
}
|
||||
else
|
||||
{
|
||||
codec = avcodec_find_encoder_by_name("ffv1");
|
||||
video->pix_fmt = PIX_FMT_RGB32;
|
||||
video->scaler.out_fmt = SCALER_FMT_ARGB8888;
|
||||
}
|
||||
|
||||
if (!codec)
|
||||
return false;
|
||||
@ -194,17 +202,6 @@ static bool ffemu_init_video(struct ff_video_info *video, const struct ffemu_par
|
||||
return false;
|
||||
}
|
||||
|
||||
if (g_settings.video.h264_record)
|
||||
{
|
||||
video->pix_fmt = PIX_FMT_BGR24;
|
||||
video->scaler.out_fmt = SCALER_FMT_BGR24;
|
||||
}
|
||||
else
|
||||
{
|
||||
video->pix_fmt = PIX_FMT_RGB32;
|
||||
video->scaler.out_fmt = SCALER_FMT_ARGB8888;
|
||||
}
|
||||
|
||||
#ifdef HAVE_FFMPEG_ALLOC_CONTEXT3
|
||||
video->codec = avcodec_alloc_context3(codec);
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user