Bladeren bron

avcodec/h263dec: Don't call ff_thread_finish_setup() unnecessarily

All hwaccels for MPEG-4/H.263 are run serially even when frame-threading
is in use. Therefore there is no gain in calling
ff_thread_finish_setup() in this case right before outputting
the frame.

Removing this call also allows to revert commit
39a5c0ac0651113750d01f3ee6bcf3819de3d7ee.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Andreas Rheinhardt 9 maanden geleden
bovenliggende
commit
e4470a8e30
1 gewijzigde bestanden met toevoegingen van 1 en 4 verwijderingen
  1. 1 4
      libavcodec/h263dec.c

+ 1 - 4
libavcodec/h263dec.c

@@ -575,7 +575,7 @@ retry:
     if ((ret = ff_mpv_frame_start(s, avctx)) < 0)
         return ret;
 
-    if (!s->divx_packed && !avctx->hwaccel)
+    if (!s->divx_packed)
         ff_thread_finish_setup(avctx);
 
     if (avctx->hwaccel) {
@@ -647,9 +647,6 @@ frame_end:
     if (CONFIG_MPEG4_DECODER && avctx->codec_id == AV_CODEC_ID_MPEG4)
         ff_mpeg4_frame_end(avctx, buf, buf_size);
 
-    if (!s->divx_packed && avctx->hwaccel)
-        ff_thread_finish_setup(avctx);
-
     av_assert1(s->pict_type == s->cur_pic.ptr->f->pict_type);
     if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {
         if ((ret = av_frame_ref(pict, s->cur_pic.ptr->f)) < 0)