diff options
author | Anton Khirnov <anton@khirnov.net> | 2017-07-29 23:03:55 +0300 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-03-20 11:16:05 +0300 |
commit | 6eae7e564482c70c785ceb33c8ad476c49f24e53 (patch) | |
tree | d395a7978e1d73895f88f2dc1e54f873af0bc0c1 /libavcodec/h264_ps.c | |
parent | bdd31feec934bad07f5035250f9cb1ec5b571062 (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_ps.c')
-rw-r--r-- | libavcodec/h264_ps.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c index 708594954c..96edb3a327 100644 --- a/libavcodec/h264_ps.c +++ b/libavcodec/h264_ps.c @@ -181,9 +181,10 @@ static inline int decode_vui_parameters(GetBitContext *gb, AVCodecContext *avctx /* chroma_location_info_present_flag */ if (get_bits1(gb)) { /* chroma_sample_location_type_top_field */ - avctx->chroma_sample_location = get_ue_golomb(gb) + 1; + sps->chroma_location = get_ue_golomb(gb) + 1; get_ue_golomb(gb); /* chroma_sample_location_type_bottom_field */ - } + } else + sps->chroma_location = AVCHROMA_LOC_LEFT; if (show_bits1(gb) && get_bits_left(gb) < 10) { av_log(avctx, AV_LOG_WARNING, "Truncated VUI (%d)\n", get_bits_left(gb)); |