| 1764 | } |
| 1765 | |
| 1766 | static 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 | |
| 1793 | static int nested_io_open(AVFormatContext *s, AVIOContext **pb, const char *url, |
| 1794 | int flags, AVDictionary **opts) |
nothing calls this directly
no test coverage detected