summaryrefslogtreecommitdiff
path: root/libavcodec/h264_ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r--libavcodec/h264_ps.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index ac316ac674..490cd20419 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -297,7 +297,7 @@ static void decode_scaling_matrices(H264Context *h, SPS *sps,
}
}
-int ff_h264_decode_seq_parameter_set(H264Context *h)
+int ff_h264_decode_seq_parameter_set(H264Context *h, int ignore_truncation)
{
int profile_idc, level_idc, constraint_set_flags = 0;
unsigned int sps_id;
@@ -518,9 +518,10 @@ int ff_h264_decode_seq_parameter_set(H264Context *h)
}
if (get_bits_left(&h->gb) < 0) {
- av_log(h->avctx, AV_LOG_ERROR,
+ av_log(h->avctx, ignore_truncation ? AV_LOG_WARNING : AV_LOG_ERROR,
"Overread %s by %d bits\n", sps->vui_parameters_present_flag ? "VUI" : "SPS", -get_bits_left(&h->gb));
- goto fail;
+ if (!ignore_truncation)
+ goto fail;
}
if (!sps->sar.den)