summaryrefslogtreecommitdiff
path: root/codec.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2011-12-25 11:36:02 +0100
committerJohns <johns98@gmx.net>2011-12-25 11:36:02 +0100
commit83413c1adfdd895ffe65087c8270576b3ba4900e (patch)
treea84ca60f8c2666e4a5c7506ca2f012dc788589cb /codec.c
parent63d18ea4889d530a92b7569bb773ccc171b3ffbd (diff)
downloadvdr-plugin-softhddevice-83413c1adfdd895ffe65087c8270576b3ba4900e.tar.gz
vdr-plugin-softhddevice-83413c1adfdd895ffe65087c8270576b3ba4900e.tar.bz2
Use only one thread for hw decoding.
Diffstat (limited to 'codec.c')
-rw-r--r--codec.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/codec.c b/codec.c
index 8bbc937..1c09e05 100644
--- a/codec.c
+++ b/codec.c
@@ -337,6 +337,8 @@ void CodecVideoOpen(VideoDecoder * decoder, const char *name, int codec_id)
if (!(decoder->VideoCtx = avcodec_alloc_context3(video_codec))) {
Fatal(_("codec: can't allocate video codec context\n"));
}
+ // FIXME: for software decoder use all cpus, otherwise 1
+ decoder->VideoCtx->thread_count = 1;
// open codec
#if LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(53,5,0)
if (avcodec_open(decoder->VideoCtx, video_codec) < 0) {
@@ -350,12 +352,6 @@ void CodecVideoOpen(VideoDecoder * decoder, const char *name, int codec_id)
decoder->VideoCtx->opaque = decoder; // our structure
- /*
- // FIXME: the number of cpu's should be configurable
- // Today this makes no big sense H264 is broken with current streams.
- avcodec_thread_init(decoder->VideoCtx, 2); // support dual-cpu's
- */
-
Debug(3, "codec: video '%s'\n", decoder->VideoCtx->codec_name);
if (codec_id == CODEC_ID_H264) {
// 2.53 Ghz CPU is too slow for this codec at 1080i