Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2017-03-29 16:33:47 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2017-03-31 15:26:24 +0300
commit1ddc37051f11bd4bbadbcd17ea49b76a965d6a47 (patch)
tree77e3f52a8b6925f87be12226b6f96beaceefbdbf /libavcodec/h264_direct.c
parentb5300c8ad8c5384ab3654d6cb27693422bc424e7 (diff)
h264: only assign H264Picture::mbaff for first slice.
The value must be identical between slices, since mbaff depends on picture_structure and sps, both of which are checked to be identical to the first slice before this point. In practice, this silences some tsan warnings in fate-h264.
Diffstat (limited to 'libavcodec/h264_direct.c')
-rw-r--r--libavcodec/h264_direct.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index 4e7202b986..a7a107c8c2 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -138,7 +138,11 @@ void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext *
memcpy(cur->ref_poc[1], cur->ref_poc[0], sizeof(cur->ref_poc[0]));
}
- cur->mbaff = FRAME_MBAFF(h);
+ if (h->current_slice == 0) {
+ cur->mbaff = FRAME_MBAFF(h);
+ } else {
+ av_assert0(cur->mbaff == FRAME_MBAFF(h));
+ }
sl->col_fieldoff = 0;