summaryrefslogtreecommitdiff
path: root/libavcodec/h264_ps.c
diff options
context:
space:
mode:
authorAnton Mitrofanov <BugMaster@narod.ru>2016-05-08 13:28:00 +0200
committerAnton Khirnov <anton@khirnov.net>2016-06-12 20:29:29 +0200
commita833ff68f6bf9dc72c3ef0ddf830ebed743c0703 (patch)
tree99baf584d14f59f73fdb4ddc7d5bdfa3af0ed5a7 /libavcodec/h264_ps.c
parent90f469aa2b98a868cdbe35170c24272de10e1341 (diff)
downloadffmpeg-a833ff68f6bf9dc72c3ef0ddf830ebed743c0703.tar.gz
h264: Fix decoding delay for Intra only streams
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/h264_ps.c')
-rw-r--r--libavcodec/h264_ps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_ps.c b/libavcodec/h264_ps.c
index f6cd1ca760..8d567cad25 100644
--- a/libavcodec/h264_ps.c
+++ b/libavcodec/h264_ps.c
@@ -530,7 +530,8 @@ int ff_h264_decode_seq_parameter_set(GetBitContext *gb, AVCodecContext *avctx,
/* if the maximum delay is not stored in the SPS, derive it based on the
* level */
- if (!sps->bitstream_restriction_flag) {
+ if (!sps->bitstream_restriction_flag &&
+ (sps->ref_frame_count || avctx->strict_std_compliance >= FF_COMPLIANCE_STRICT)) {
sps->num_reorder_frames = MAX_DELAYED_PIC_COUNT - 1;
for (i = 0; i < FF_ARRAY_ELEMS(level_max_dpb_mbs); i++) {
if (level_max_dpb_mbs[i][0] == sps->level_idc) {