aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJeff Downs <heydowns@borg.com>2007-11-06 18:48:18 +0000
committerJeff Downs <heydowns@borg.com>2007-11-06 18:48:18 +0000
commitc0a8500015890af5478f11e130a35587e8eee731 (patch)
treea3ea481351b875e3fbc8e3d0728c6d60bae99a32 /libavcodec
parentc03af894eb4baa4ebc0b6d17899d510dab0ec84b (diff)
downloadffmpeg-c0a8500015890af5478f11e130a35587e8eee731.tar.gz
Fix poc for field pictures. Prior to this, the poc of the second field
in decoding order would always be assigned to a field pair's poc. Original thread: H.264: Fix poc for field pairs, 6 Nov 2007 17:41:02 Originally committed as revision 10937 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index ec0cdcba55..2be67536d0 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3767,8 +3767,10 @@ static int init_poc(H264Context *h){
s->current_picture_ptr->field_poc[1]= field_poc[1];
s->current_picture_ptr->poc = field_poc[1];
}
- if(!FIELD_PICTURE || !s->first_field)
- s->current_picture_ptr->poc= FFMIN(field_poc[0], field_poc[1]);
+ if(!FIELD_PICTURE || !s->first_field) {
+ Picture *cur = s->current_picture_ptr;
+ cur->poc= FFMIN(cur->field_poc[0], cur->field_poc[1]);
+ }
return 0;
}