summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index bb866b696e..3c4f5095b1 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1628,6 +1628,11 @@ static int decode_update_thread_context(AVCodecContext *dst,
h->sps.chroma_format_idc != h1->sps.chroma_format_idc ||
h->sps.colorspace != h1->sps.colorspace)) {
+ /* set bits_per_raw_sample to the previous value. the check for changed
+ * bit depth in h264_set_parameter_from_sps() uses it and sets it to
+ * the current value */
+ h->avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
+
av_freep(&h->bipred_scratchpad);
h->width = h1->width;