diff options
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 80c6bb386a..edc9e229fa 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -527,7 +527,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src s->last_pict_type= s1->pict_type; if (s1->current_picture_ptr) s->last_lambda_for[s1->pict_type] = s1->current_picture_ptr->quality; - if(s1->pict_type!=AV_PICTURE_TYPE_B){ + if(s1->pict_type!=FF_B_TYPE){ s->last_non_b_pict_type= s1->pict_type; } } @@ -586,7 +586,8 @@ av_cold int MPV_common_init(MpegEncContext *s) return -1; } - if(s->avctx->active_thread_type&FF_THREAD_SLICE && + + if((s->avctx->active_thread_type & FF_THREAD_SLICE) && (s->avctx->thread_count > MAX_THREADS || (s->avctx->thread_count > s->mb_height && s->mb_height))){ av_log(s->avctx, AV_LOG_ERROR, "too many threads\n"); return -1; @@ -763,6 +764,7 @@ av_cold int MPV_common_init(MpegEncContext *s) if(init_duplicate_context(s, s) < 0) goto fail; s->start_mb_y = 0; s->end_mb_y = s->mb_height; + } return 0; @@ -2634,6 +2636,6 @@ void ff_set_qscale(MpegEncContext * s, int qscale) void MPV_report_decode_progress(MpegEncContext *s) { - if (s->pict_type != AV_PICTURE_TYPE_B && !s->partitioned_frame) + if (s->pict_type != FF_B_TYPE && !s->partitioned_frame && !s->error_occurred) ff_thread_report_progress((AVFrame*)s->current_picture_ptr, s->mb_y, 0); } |