summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-04-12 20:43:52 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-04-12 20:43:52 +0000
commitd225a1e24890e779ac7985a78857f5e8f0a6dba2 (patch)
treefd6d7d9efb2a30c236000e86708b3ac4f8e0539d /libavcodec
parentead793358ac8d0a5adbd8cf92b85a139caa8a1e2 (diff)
Fix 2 access units in a packet mp4s.
Fixes issue944 and possibly others. Originally committed as revision 18474 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 313ad2696f..e0250a99d3 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -3660,6 +3660,8 @@ static void field_end(H264Context *h){
ff_er_frame_end(s);
MPV_frame_end(s);
+
+ h->current_slice=0;
}
/**
@@ -3720,7 +3722,11 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
first_mb_in_slice= get_ue_golomb(&s->gb);
- if((s->flags2 & CODEC_FLAG2_CHUNKS) && first_mb_in_slice == 0){
+ if(first_mb_in_slice == 0){ //FIXME better field boundary detection
+ if(h0->current_slice && FIELD_PICTURE){
+ field_end(h);
+ }
+
h0->current_slice = 0;
if (!s0->first_field)
s->current_picture_ptr= NULL;