summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-05-06 17:04:03 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-05-06 17:04:03 +0000
commitb712fb67402caba158eb507a3e32fbe067ed139c (patch)
tree900096cd1b81ec9e576c97d26a97d2e46100110d /libavcodec
parent415264045fe169ea1224defdc090287dcad24b06 (diff)
fix decoding of conformace streams AUD_MW_E.264 and BA1_FT_C.264 again (there where last correctly decoded with h264.c rev 1.96)
Originally committed as revision 4189 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index fbd11d275a..0cd04f923b 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3697,6 +3697,11 @@ static int init_poc(H264Context *h){
if(h->sps.poc_type==0){
const int max_poc_lsb= 1<<h->sps.log2_max_poc_lsb;
+ if(h->nal_unit_type == NAL_IDR_SLICE){
+ h->prev_poc_msb=
+ h->prev_poc_lsb= 0;
+ }
+
if (h->poc_lsb < h->prev_poc_lsb && h->prev_poc_lsb - h->poc_lsb >= max_poc_lsb/2)
h->poc_msb = h->prev_poc_msb + max_poc_lsb;
else if(h->poc_lsb > h->prev_poc_lsb && h->prev_poc_lsb - h->poc_lsb < -max_poc_lsb/2)
@@ -6946,7 +6951,7 @@ static int decode_frame(AVCodecContext *avctx,
cur->reference = 1;
for(i=0; h->delayed_pic[i]; i++)
- if(h->delayed_pic[i]->key_frame)
+ if(h->delayed_pic[i]->key_frame || h->delayed_pic[i]->poc==0)
cross_idr = 1;
out = h->delayed_pic[0];