On 6/29/11 4:13 PM, Ronald S. Bultje wrote:
From: Frank Barchard<[email protected]>
Instead, just decrease it to a valid value and use that.
Signed-off-by: Ronald S. Bultje<[email protected]>
---
libavcodec/mpegvideo.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 4978d28..10362fe 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -574,7 +574,11 @@ void MPV_decode_defaults(MpegEncContext *s){
*/
av_cold int MPV_common_init(MpegEncContext *s)
{
- int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y,
threads;
+ int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y,
+ threads = (s->encoding ||
+ (HAVE_THREADS&&
+ s->avctx->active_thread_type& FF_THREAD_SLICE)) ?
+ s->avctx->thread_count : 1;
I'd reformat those lines a bit beside that looks fine.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel