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

Function recheck_discard_flags

libavformat/dashdec.c:2186–2209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2184}
2185
2186static void recheck_discard_flags(AVFormatContext *s, struct representation **p, int n)
2187{
2188 int i, j;
2189
2190 for (i = 0; i < n; i++) {
2191 struct representation *pls = p[i];
2192 int needed = !pls->assoc_stream || pls->assoc_stream->discard < AVDISCARD_ALL;
2193
2194 if (needed && !pls->ctx) {
2195 pls->cur_seg_offset = 0;
2196 pls->init_sec_buf_read_offset = 0;
2197 /* Catch up */
2198 for (j = 0; j < n; j++) {
2199 pls->cur_seq_no = FFMAX(pls->cur_seq_no, p[j]->cur_seq_no);
2200 }
2201 reopen_demux_for_component(s, pls);
2202 av_log(s, AV_LOG_INFO, "Now receiving stream_index %d\n", pls->stream_index);
2203 } else if (!needed && pls->ctx) {
2204 close_demux_for_component(pls);
2205 ff_format_io_close(pls->parent, &pls->input);
2206 av_log(s, AV_LOG_INFO, "No longer receiving stream_index %d\n", pls->stream_index);
2207 }
2208 }
2209}
2210
2211static int dash_read_packet(AVFormatContext *s, AVPacket *pkt)
2212{

Callers 1

dash_read_packetFunction · 0.70

Calls 4

av_logFunction · 0.85
ff_format_io_closeFunction · 0.85

Tested by

no test coverage detected