| 91 | } |
| 92 | |
| 93 | void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove, int fuzzy) |
| 94 | { |
| 95 | int i; |
| 96 | |
| 97 | if (!fuzzy) { |
| 98 | s->dts = |
| 99 | s->pts = AV_NOPTS_VALUE; |
| 100 | s->pos = -1; |
| 101 | s->offset = 0; |
| 102 | } |
| 103 | for (i = 0; i < AV_PARSER_PTS_NB; i++) { |
| 104 | if (s->cur_offset + off >= s->cur_frame_offset[i] && |
| 105 | (s->frame_offset < s->cur_frame_offset[i] || |
| 106 | (!s->frame_offset && !s->next_frame_offset)) && // first field/frame |
| 107 | // check disabled since MPEG-TS does not send complete PES packets |
| 108 | /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){ |
| 109 | |
| 110 | if (!fuzzy || s->cur_frame_dts[i] != AV_NOPTS_VALUE) { |
| 111 | s->dts = s->cur_frame_dts[i]; |
| 112 | s->pts = s->cur_frame_pts[i]; |
| 113 | s->pos = s->cur_frame_pos[i]; |
| 114 | s->offset = s->next_frame_offset - s->cur_frame_offset[i]; |
| 115 | } |
| 116 | if (remove) |
| 117 | s->cur_frame_offset[i] = INT64_MAX; |
| 118 | if (s->cur_offset + off < s->cur_frame_end[i]) |
| 119 | break; |
| 120 | } |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | int av_parser_parse2(AVCodecParserContext *s, AVCodecContext *avctx, |
| 125 | uint8_t **poutbuf, int *poutbuf_size, |
no outgoing calls
no test coverage detected