summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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