| 1705 | } |
| 1706 | |
| 1707 | static int read_from_url(struct representation *pls, struct fragment *seg, |
| 1708 | uint8_t *buf, int buf_size) |
| 1709 | { |
| 1710 | int ret; |
| 1711 | |
| 1712 | /* limit read if the fragment was only a part of a file */ |
| 1713 | if (seg->size >= 0) |
| 1714 | buf_size = FFMIN(buf_size, pls->cur_seg_size - pls->cur_seg_offset); |
| 1715 | |
| 1716 | ret = avio_read(pls->input, buf, buf_size); |
| 1717 | if (ret > 0) |
| 1718 | pls->cur_seg_offset += ret; |
| 1719 | |
| 1720 | return ret; |
| 1721 | } |
| 1722 | |
| 1723 | static int open_input(DASHContext *c, struct representation *pls, struct fragment *seg) |
| 1724 | { |
no test coverage detected