Mercurial > libavcodec.hg
comparison parser.c @ 9090:cecf81f93756 libavcodec
Call ff_fetch_timestamp() for mpeg1/2 when a picture start code is found instead
of calling it at the end of a frame with a large negative offset.
This significantly reduces the maximal distance in container packets between
the point where the first byte of the "access unit" was stored and where
we call ff_fetch_timestamp() thus reducing the constraints on our parser.
Also change the parser from next_frame_offset to cur, this is needed
because now the reference is from container packet start instead of
frame start. (i previously misinterpreted this as bug)
| author | michael |
|---|---|
| date | Mon, 02 Mar 2009 14:53:18 +0000 |
| parents | d4c12f2d226b |
| children | 4875c1559060 |
comparison
equal
deleted
inserted
replaced
| 9089:bea68afbf199 | 9090:cecf81f93756 |
|---|---|
| 85 int i; | 85 int i; |
| 86 | 86 |
| 87 s->dts= s->pts= AV_NOPTS_VALUE; | 87 s->dts= s->pts= AV_NOPTS_VALUE; |
| 88 s->offset= 0; | 88 s->offset= 0; |
| 89 for(i = 0; i < AV_PARSER_PTS_NB; i++) { | 89 for(i = 0; i < AV_PARSER_PTS_NB; i++) { |
| 90 if ( s->next_frame_offset + off >= s->cur_frame_offset[i] | 90 if ( s->cur_offset + off >= s->cur_frame_offset[i] |
| 91 &&(s-> frame_offset < s->cur_frame_offset[i] || !s->frame_offset) | 91 &&(s-> frame_offset < s->cur_frame_offset[i] || !s->frame_offset) |
| 92 //check is disabled becausue mpeg-ts doesnt send complete PES packets | 92 //check is disabled becausue mpeg-ts doesnt send complete PES packets |
| 93 && /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){ | 93 && /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){ |
| 94 s->dts= s->cur_frame_dts[i]; | 94 s->dts= s->cur_frame_dts[i]; |
| 95 s->pts= s->cur_frame_pts[i]; | 95 s->pts= s->cur_frame_pts[i]; |
