aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLoïc Le Loarer <lll+ffmpeg@m4x.org>2005-02-01 11:12:53 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-02-01 11:12:53 +0000
commitdc032f33322ea94c9a9cc7b7fc92f1c0a840c277 (patch)
tree585565ba202e3d9457037d497013cdf45e9528e1 /libavcodec
parentbf2bc926f04dcdde0a22c137d08a0bb546e0179e (diff)
downloadffmpeg-dc032f33322ea94c9a9cc7b7fc92f1c0a840c277.tar.gz
correct long term picture management patch by (Loic <lll+ffmpeg m4x org>)
fixes decoding of MR2_MW_A.264 Originally committed as revision 3916 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 83464826ea..dbedcb48ce 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3150,10 +3150,12 @@ static void idr(H264Context *h){
break; \
}
- for(i=0; i<h->long_ref_count; i++){
- h->long_ref[i]->reference=0;
- CHECK_DELAY(h->long_ref[i]);
- h->long_ref[i]= NULL;
+ for(i=0; i<16; i++){
+ if (h->long_ref[i] != NULL) {
+ h->long_ref[i]->reference=0;
+ CHECK_DELAY(h->long_ref[i]);
+ h->long_ref[i]= NULL;
+ }
}
h->long_ref_count=0;
@@ -3263,6 +3265,7 @@ static int execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count){
h->long_ref[ mmco[i].long_index ]= remove_short(h, mmco[i].short_frame_num);
h->long_ref[ mmco[i].long_index ]->long_ref=1;
+ h->long_ref_count++;
break;
case MMCO_LONG2UNUSED:
pic= remove_long(h, mmco[i].long_index);