comparison parser.c @ 9878:05a510cd1e3b libavcodec

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.
author bcoudurier
date Sun, 21 Jun 2009 03:50:26 +0000
parents 5ebac9debadf
children b94e1810ce4c
comparison
equal deleted inserted replaced
9877:7c769effb964 9878:05a510cd1e3b
87 s->dts= s->pts= AV_NOPTS_VALUE; 87 s->dts= s->pts= AV_NOPTS_VALUE;
88 s->pos= -1; 88 s->pos= -1;
89 s->offset= 0; 89 s->offset= 0;
90 for(i = 0; i < AV_PARSER_PTS_NB; i++) { 90 for(i = 0; i < AV_PARSER_PTS_NB; i++) {
91 if ( s->cur_offset + off >= s->cur_frame_offset[i] 91 if ( s->cur_offset + off >= s->cur_frame_offset[i]
92 &&(s-> frame_offset < s->cur_frame_offset[i] || !s->frame_offset) 92 && (s->frame_offset < s->cur_frame_offset[i] ||
93 (!s->frame_offset && !s->next_frame_offset)) // first field/frame
93 //check is disabled becausue mpeg-ts doesnt send complete PES packets 94 //check is disabled becausue mpeg-ts doesnt send complete PES packets
94 && /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){ 95 && /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){
95 s->dts= s->cur_frame_dts[i]; 96 s->dts= s->cur_frame_dts[i];
96 s->pts= s->cur_frame_pts[i]; 97 s->pts= s->cur_frame_pts[i];
97 s->pos= s->cur_frame_pos[i]; 98 s->pos= s->cur_frame_pos[i];