diff mbox series

[FFmpeg-devel,3/3,v2] avcodec/h264_picture: use ff_thread_replace_frame()

Message ID 20220803160248.4190-3-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/3,v4] avutil/frame: add av_frame_replace | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

James Almer Aug. 3, 2022, 4:02 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/h264_picture.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c
index 2661ff4698..dcaf0fdb0a 100644
--- a/libavcodec/h264_picture.c
+++ b/libavcodec/h264_picture.c
@@ -154,8 +154,7 @@  int ff_h264_replace_picture(H264Context *h, H264Picture *dst, const H264Picture
     av_assert0(src->tf.f == src->f);
 
     dst->tf.f = dst->f;
-    ff_thread_release_ext_buffer(h->avctx, &dst->tf);
-    ret = ff_thread_ref_frame(&dst->tf, &src->tf);
+    ret = ff_thread_replace_frame(h->avctx, &dst->tf, &src->tf);
     if (ret < 0)
         goto fail;