# HG changeset patch # User michael # Date 1089410110 0 # Node ID f8948ed6553a201eeb64f2975eabc5665266fed6 # Parent b11c0bb3b71c9bf569d4b7ff8768b3d874f3ffdd field pic timestamp fix diff -r b11c0bb3b71c -r f8948ed6553a parser.c --- a/parser.c Fri Jul 09 12:49:55 2004 +0000 +++ b/parser.c Fri Jul 09 21:55:10 2004 +0000 @@ -281,7 +281,7 @@ 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 @@ 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 @@ 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; }