From 392cef9b37fe7166a8b69685b1e7d73fc3cf15d1 Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Thu, 4 Feb 2010 21:47:38 +0000 Subject: Work around an ffmpeg SVQ3 bug; check for avcodec_thread_init failure. --- ChangeLog | 1 + src/combined/ffmpeg/ff_video_decoder.c | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5cbb50e5d..8a1b95390 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ xine-lib (1.1.18) 20??-??-?? * More meta-information tags. (Nothing sets these yet, though.) * Added basic support for .qtl (Quicktime media link). * "Fixed" playback of 24-bit FLAC. + * Work around an ffmpeg bug concerning Sorenson Video 3. xine-lib (1.1.17) 2009-12-01 * Add support for Matroska SIMPLEBLOCK. diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 727508847..8c604e047 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -357,8 +357,9 @@ static void init_video_codec (ff_video_decoder_t *this, unsigned int codec_type) } if (this->class->thread_count > 1) { - avcodec_thread_init(this->context, this->class->thread_count); - this->context->thread_count = this->class->thread_count; + if (this->codec->id != CODEC_ID_SVQ3 + && avcodec_thread_init(this->context, this->class->thread_count) != -1) + this->context->thread_count = this->class->thread_count; } this->context->skip_loop_filter = skip_loop_filter_enum_values[this->class->skip_loop_filter_enum]; -- cgit v1.2.3