summaryrefslogtreecommitdiffstats
path: root/libhb/hb.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-06-10 15:31:32 +0000
committerjstebbins <[email protected]>2011-06-10 15:31:32 +0000
commit8b804a5e65b322aa2a0cbbfd43e0c54b62b5f5f5 (patch)
tree3474f3c43c1564e9a32508e5bdc2f507198b84ba /libhb/hb.c
parenta824a5037c0e2b9e7a196c5632e7774b8ac99ea8 (diff)
libhb: disable threaded ffmpeg decoding for scan
There is a bug in ffmpeg that causes a crash if you call avcodec_open and avcodec_close repeatedly on the same AVCodecContext. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4037 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/hb.c')
-rw-r--r--libhb/hb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libhb/hb.c b/libhb/hb.c
index b1050e0e0..981a2ed21 100644
--- a/libhb/hb.c
+++ b/libhb/hb.c
@@ -111,6 +111,10 @@ int hb_avcodec_open(AVCodecContext *avctx, AVCodec *codec, int thread_count)
avctx->thread_type = FF_THREAD_FRAME|FF_THREAD_SLICE;
avctx->thread_safe_callbacks = 1;
}
+ else
+ {
+ avctx->thread_count = 1;
+ }
ret = avcodec_open(avctx, codec);
return ret;