| OLD | NEW |
| (Empty) | |
| 1 diff -wurp -N orig/libavcodec/mpegvideo.c ffmpeg-mt/libavcodec/mpegvideo.c |
| 2 --- orig/libavcodec/mpegvideo.c 2010-11-04 08:11:14 -0700 |
| 3 +++ ffmpeg-mt/libavcodec/mpegvideo.c 2010-11-04 08:11:24 -0700 |
| 4 @@ -584,8 +584,7 @@ av_cold int MPV_common_init(MpegEncConte |
| 5 return -1; |
| 6 } |
| 7 |
| 8 - if(s->avctx->active_thread_type&FF_THREAD_SLICE && |
| 9 - (s->avctx->thread_count > MAX_THREADS || (s->avctx->thread_count > s->mb
_height && s->mb_height))){ |
| 10 + if(s->avctx->thread_count > MAX_THREADS){ |
| 11 av_log(s->avctx, AV_LOG_ERROR, "too many threads\n"); |
| 12 return -1; |
| 13 } |
| 14 @@ -745,6 +744,11 @@ av_cold int MPV_common_init(MpegEncConte |
| 15 if (HAVE_THREADS && s->avctx->active_thread_type&FF_THREAD_SLICE) { |
| 16 threads = s->avctx->thread_count; |
| 17 |
| 18 + if (s->avctx->thread_count > s->mb_height && s->mb_height) { |
| 19 + av_log(s->avctx, AV_LOG_WARNING, "Reducing from %d to %d threads du
e to height of %d pixels.\n", s->avctx->thread_count, s->mb_height, s->height); |
| 20 + threads = s->mb_height; |
| 21 + } |
| 22 + |
| 23 for(i=1; i<threads; i++){ |
| 24 s->thread_context[i]= av_malloc(sizeof(MpegEncContext)); |
| 25 memcpy(s->thread_context[i], s, sizeof(MpegEncContext)); |
| OLD | NEW |