MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / ff_fetch_timestamp

Function ff_fetch_timestamp

libavcodec/parser.c:84–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void ff_fetch_timestamp(AVCodecParserContext *s, int off, int remove){
85 int i;
86
87 s->dts= s->pts= AV_NOPTS_VALUE;
88 s->pos= -1;
89 s->offset= 0;
90 for(i = 0; i < AV_PARSER_PTS_NB; i++) {
91 if ( s->cur_offset + off >= s->cur_frame_offset[i]
92 && (s->frame_offset < s->cur_frame_offset[i] ||
93 (!s->frame_offset && !s->next_frame_offset)) // first field/frame
94 //check is disabled because mpeg-ts doesnt send complete PES packets
95 && /*s->next_frame_offset + off <*/ s->cur_frame_end[i]){
96 s->dts= s->cur_frame_dts[i];
97 s->pts= s->cur_frame_pts[i];
98 s->pos= s->cur_frame_pos[i];
99 s->offset = s->next_frame_offset - s->cur_frame_offset[i];
100 if(remove)
101 s->cur_frame_offset[i]= INT64_MAX;
102 if(s->cur_offset + off < s->cur_frame_end[i])
103 break;
104 }
105 }
106}
107
108/**
109 *

Callers 2

av_parser_parse2Function · 0.85
ff_mpeg1_find_frame_endFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected