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

Function read_data_subtitle_segment

libavformat/hls.c:1766–1791  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1764}
1765
1766static int read_data_subtitle_segment(void *opaque, uint8_t *buf, int buf_size)
1767{
1768 struct playlist *v = opaque;
1769 HLSContext *c = v->parent->priv_data;
1770 int ret;
1771 struct segment *seg;
1772
1773 if (!v->needed || v->cur_seq_no - v->start_seq_no >= v->n_segments) {
1774 return AVERROR_EOF;
1775 } else {
1776 seg = current_segment(v);
1777 }
1778
1779 if (!v->input) {
1780 ret = open_input(c, v, seg, &v->input);
1781 if (ret < 0) {
1782 if (ff_check_interrupt(c->interrupt_callback))
1783 return AVERROR_EXIT;
1784 av_log(v->parent, AV_LOG_WARNING, "Failed to open segment of playlist %d\n",
1785 v->index);
1786 return ret;
1787 }
1788 }
1789
1790 return read_from_url(v, seg, buf, buf_size);
1791}
1792
1793static int nested_io_open(AVFormatContext *s, AVIOContext **pb, const char *url,
1794 int flags, AVDictionary **opts)

Callers

nothing calls this directly

Calls 5

current_segmentFunction · 0.85
ff_check_interruptFunction · 0.85
av_logFunction · 0.85
open_inputFunction · 0.70
read_from_urlFunction · 0.70

Tested by

no test coverage detected