aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-07-09 21:55:10 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-07-09 21:55:10 +0000
commit8dab64b6c18cf62b09ce7289388cac508d5bb921 (patch)
tree475bd964b43e9223789a2fe5f21fba1516379f67 /libavcodec
parentfc3e9202aaa72301bad9c942d39f90500a5c54d8 (diff)
downloadffmpeg-8dab64b6c18cf62b09ce7289388cac508d5bb921.tar.gz
field pic timestamp fix
Originally committed as revision 3300 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/parser.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 7b01da4a69..50888a8e18 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -281,7 +281,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
int32_t start_code;
int frame_rate_index, ext_type, bytes_left;
int frame_rate_ext_n, frame_rate_ext_d;
- int top_field_first, repeat_first_field, progressive_frame;
+ int picture_structure, top_field_first, repeat_first_field, progressive_frame;
int horiz_size_ext, vert_size_ext;
s->repeat_pict = 0;
@@ -328,6 +328,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
break;
case 0x8: /* picture coding extension */
if (bytes_left >= 5) {
+ picture_structure = (buf[3]>>5)&3;
top_field_first = buf[3] & (1 << 7);
repeat_first_field = buf[3] & (1 << 1);
progressive_frame = buf[4] & (1 << 7);
@@ -343,6 +344,11 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
s->repeat_pict = 1;
}
}
+
+ /* the packet only represents half a frame
+ XXX,FIXME maybe find a different solution */
+ if(picture_structure != 3)
+ s->repeat_pict = -1;
}
break;
}