mirror of
https://github.com/rock88/moonlight-nx
synced 2024-11-26 21:40:18 +00:00
Allow hardware decoder setup context
This commit is contained in:
parent
5beba07c9c
commit
8ad43c39b0
1 changed files with 4 additions and 1 deletions
|
@ -41,7 +41,6 @@ int FFmpegVideoDecoder::setup(int video_format, int width, int height, int redra
|
||||||
|
|
||||||
int perf_lvl = SLICE_THREADING;
|
int perf_lvl = SLICE_THREADING;
|
||||||
|
|
||||||
//ffmpeg_decoder = perf_lvl & VAAPI_ACCELERATION ? VAAPI : SOFTWARE;
|
|
||||||
switch (video_format) {
|
switch (video_format) {
|
||||||
case VIDEO_FORMAT_H264:
|
case VIDEO_FORMAT_H264:
|
||||||
m_decoder = avcodec_find_decoder_by_name("h264");
|
m_decoder = avcodec_find_decoder_by_name("h264");
|
||||||
|
@ -109,6 +108,10 @@ int FFmpegVideoDecoder::setup(int video_format, int width, int height, int redra
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_hardware_video_decoder) {
|
||||||
|
m_hardware_video_decoder->prepare_decoder_context(m_decoder_context, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
return DR_OK;
|
return DR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue