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:
authorAnton Khirnov <anton@khirnov.net>2017-07-29 23:03:55 +0300
committerAnton Khirnov <anton@khirnov.net>2020-03-20 11:16:05 +0300
commit6eae7e564482c70c785ceb33c8ad476c49f24e53 (patch)
treed395a7978e1d73895f88f2dc1e54f873af0bc0c1 /libavcodec/h264_ps.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_ps.c')
-rw-r--r--libavcodec/h264_ps.c5
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));