diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-29 13:48:02 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-29 13:48:45 +0200 |
commit | 51f7ba9ceec0053ee9c1ad900e1e0a49d3008137 (patch) | |
tree | 82280d8988d4684c5298a04341b458434527d3eb /libavcodec/h264_slice.c | |
parent | 16b90d0bcbca75b48f5d6ba6555c185424cbc7e6 (diff) | |
parent | c9ccbc7333eddd025ebbde5cc4f27d68a950c623 (diff) |
Merge commit 'c9ccbc7333eddd025ebbde5cc4f27d68a950c623'
* commit 'c9ccbc7333eddd025ebbde5cc4f27d68a950c623':
h264: update the current bit depth/chroma type in init_slice_header()
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 9a41b8c0bf..ac900d6f30 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1124,6 +1124,8 @@ static int h264_slice_header_init(H264Context *h, int reinit) h->avctx->bits_per_raw_sample = h->sps.bit_depth_luma; h->cur_chroma_format_idc = h->sps.chroma_format_idc; h->pixel_shift = h->sps.bit_depth_luma > 8; + h->chroma_format_idc = h->sps.chroma_format_idc; + h->bit_depth_luma = h->sps.bit_depth_luma; ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma, h->sps.chroma_format_idc); @@ -1325,11 +1327,8 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) needs_reinit = 1; if (h->bit_depth_luma != h->sps.bit_depth_luma || - h->chroma_format_idc != h->sps.chroma_format_idc) { - h->bit_depth_luma = h->sps.bit_depth_luma; - h->chroma_format_idc = h->sps.chroma_format_idc; + h->chroma_format_idc != h->sps.chroma_format_idc) needs_reinit = 1; - } if (h->flags & CODEC_FLAG_LOW_DELAY || (h->sps.bitstream_restriction_flag && |