From c8ecc9954893a5e156c5972ee8e14c0a0c358b37 Mon Sep 17 00:00:00 2001
From: Mike Scheutzow <mjs973@optonline.net>
Date: Sat, 7 May 2011 11:43:31 -0400
Subject: [PATCH] Improved detection of h264 bitstream with no B frames
The sps.constraint_set0_flag indicates that the bitstream is baseline profile,
which means the stream has no B-pictures. This patch fixes trac0088.
Signed-off-by: Mike Scheutzow <mjs973@optonline.net>
---
libavcodec/h264.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 353a0b3..e7c33ed 100644
|
a
|
b
|
static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
|
| 3051 | 3051 | ff_h264_decode_seq_parameter_set(h); |
| 3052 | 3052 | |
| 3053 | 3053 | if(s->flags& CODEC_FLAG_LOW_DELAY || |
| | 3054 | (h->sps.constraint_set_flags & 0x01) || |
| 3054 | 3055 | (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames)) |
| 3055 | 3056 | s->low_delay=1; |
| 3056 | 3057 | |