improve OSD with screenresize

This commit is contained in:
jojo61
2018-09-28 17:02:56 +02:00
parent 97f53c8274
commit 1aa7c1a998
4 changed files with 51 additions and 25 deletions

View File

@@ -302,6 +302,12 @@ void CodecVideoOpen(VideoDecoder * decoder, int codec_id)
if (!(decoder->VideoCtx = avcodec_alloc_context3(video_codec))) {
Fatal(_("codec: can't allocate video codec context\n"));
}
if (!HwDeviceContext) {
Fatal("codec: no hw device context to be used");
}
decoder->VideoCtx->hw_device_ctx = av_buffer_ref(HwDeviceContext);
// FIXME: for software decoder use all cpus, otherwise 1
decoder->VideoCtx->thread_count = 1;