diff mbox

[FFmpeg-devel,1/6] h264: don't write to source picture object in ff_h264_ref_picture().

Message ID 1490796744-76454-1-git-send-email-rsbultje@gmail.com
State Accepted
Commit b5300c8ad8c5384ab3654d6cb27693422bc424e7
Headers show

Commit Message

Ronald S. Bultje March 29, 2017, 2:12 p.m. UTC
Doing so is analogous to writing to source data in memcpy(), and causes
(harmless) tsan warnings in fate-h264.
---
 libavcodec/h264_picture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer March 29, 2017, 10:07 p.m. UTC | #1
On Wed, Mar 29, 2017 at 10:12:19AM -0400, Ronald S. Bultje wrote:
> Doing so is analogous to writing to source data in memcpy(), and causes
> (harmless) tsan warnings in fate-h264.
> ---
>  libavcodec/h264_picture.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c
> index f634d2a..db96737 100644
> --- a/libavcodec/h264_picture.c
> +++ b/libavcodec/h264_picture.c
> @@ -70,8 +70,8 @@ int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src)
>  
>      av_assert0(!dst->f->buf[0]);
>      av_assert0(src->f->buf[0]);
> +    av_assert0(src->tf.f == src->f);
>  
> -    src->tf.f = src->f;

should be ok

thx

[...]
diff mbox

Patch

diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c
index f634d2a..db96737 100644
--- a/libavcodec/h264_picture.c
+++ b/libavcodec/h264_picture.c
@@ -70,8 +70,8 @@  int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src)
 
     av_assert0(!dst->f->buf[0]);
     av_assert0(src->f->buf[0]);
+    av_assert0(src->tf.f == src->f);
 
-    src->tf.f = src->f;
     dst->tf.f = dst->f;
     ret = ff_thread_ref_frame(&dst->tf, &src->tf);
     if (ret < 0)