# HG changeset patch # User bcoudurier # Date 1245556226 0 # Node ID 05a510cd1e3be4bdfb1ae5489877049a92049532 # Parent 7c769effb964adba1b4715f34116ae938461eada Fetch timestamp for the first frame of field only if frame_offset and next_frame_offset are not set, because second field has next frame offset set but not frame_offset, otherwise this wrongly fetch timestamp for the second field. diff -r 7c769effb964 -r 05a510cd1e3b parser.c --- a/parser.c Sat Jun 20 14:47:38 2009 +0000 +++ b/parser.c Sun Jun 21 03:50:26 2009 +0000 @@ -89,7 +89,8 @@ s->offset= 0; for(i = 0; i < AV_PARSER_PTS_NB; i++) { if ( s->cur_offset + off >= s->cur_frame_offset[i] - &&(s-> frame_offset < s->cur_frame_offset[i] || !s->frame_offset) + && (s->frame_offset < s->cur_frame_offset[i] || + (!s->frame_offset && !s->next_frame_offset)) // first field/frame //check is disabled becausue mpeg-ts doesnt send complete PES packets && /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){ s->dts= s->cur_frame_dts[i];