summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2017-07-29 22:03:55 +0200
committerAnton Khirnov <anton@khirnov.net>2020-03-20 09:16:05 +0100
commit6eae7e564482c70c785ceb33c8ad476c49f24e53 (patch)
treed395a7978e1d73895f88f2dc1e54f873af0bc0c1 /libavcodec/h264_slice.c
parentbdd31feec934bad07f5035250f9cb1ec5b571062 (diff)
h264dec: do not export the chroma sample location immediately on parsing the SPS
This SPS is not necessarily the one that will be used. Export the chroma location along with all the other SPS properties.
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 34f659b299..af30f6267b 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1086,6 +1086,7 @@ static int h264_init_ps(H264Context *h, const H264SliceContext *sl, int first_sl
h->avctx->color_trc = h->sei.alternative_transfer.preferred_transfer_characteristics;
}
}
+ h->avctx->chroma_sample_location = sps->chroma_location;
if (!h->context_initialized || must_reinit || needs_reinit) {
int flush_changes = h->context_initialized;