38 int64_t pos, avail_size;
60 if (size <= avail_size)
85 int len, fill_size, size1, frame_offset,
id;
86 int64_t last_pos = -1;
128 seekback =
FFMAX(seekback, 0);
167 av_dlog(s,
"seek to %"PRIx64
" -> %"PRIx64
"\n", pos1, pos);
179 av_dlog(s,
"dts=%0.6f\n", dts / 1000000.0);
189 int64_t pos_min, pos_max;
197 pts_start =
get_dts(s, pos_min);
201 if (pts - 100000 > pts_start)
206 pts_start =
get_dts(s, pos_min);
210 if (pts - 100000 <= pts_start) {
217 if (newpos == pos_min)
222 if (newpts - 100000 <= pts) {
276 int f_main = 0, f_cprv = -1, f_stvi = -1, f_stau = -1;
295 ffm->
file_size = (UINT64_C(1) << 63) - 1;
308 case MKBETAG(
'M',
'A',
'I',
'N'):
316 case MKBETAG(
'C',
'O',
'M',
'M'):
317 f_cprv = f_stvi = f_stau = 0;
352 case MKBETAG(
'S',
'T',
'V',
'I'):
380 avio_get_str(pb, INT_MAX, rc_eq_buf,
sizeof(rc_eq_buf));
413 case MKBETAG(
'S',
'T',
'A',
'U'):
422 case MKBETAG(
'C',
'P',
'R',
'V'):
439 case MKBETAG(
'S',
'2',
'V',
'I'):
440 if (f_stvi++ || !size) {
454 case MKBETAG(
'S',
'2',
'A',
'U'):
455 if (f_stau++ || !size) {
501 if (tag ==
MKTAG(
'F',
'F',
'M',
'2'))
503 if (tag !=
MKTAG(
'F',
'F',
'M',
'1'))
515 ffm->
file_size = (UINT64_C(1) << 63) - 1;
576 avio_get_str(pb, INT_MAX, rc_eq_buf,
sizeof(rc_eq_buf));
652 av_dlog(s,
"pos=%08"PRIx64
" spos=%"PRIx64
", write_index=%"PRIx64
" size=%"PRIx64
"\n",
706 int64_t pos_min, pos_max, pos;
707 int64_t pts_min, pts_max,
pts;
710 av_dlog(s,
"wanted_pts=%0.6f\n", wanted_pts / 1000000.0);
725 while (pos_min <= pos_max) {
728 if (pts_min > wanted_pts || pts_max <= wanted_pts) {
729 pos = pts_min > wanted_pts ? pos_min : pos_max;
733 pos1 = (double)(pos_max - pos_min) * (double)(wanted_pts - pts_min) /
734 (double)(pts_max - pts_min);
738 else if (pos >= pos_max)
742 if (pts == wanted_pts) {
744 }
else if (pts > wanted_pts) {
768 p->
buf[0] ==
'F' && p->
buf[1] ==
'F' && p->
buf[2] ==
'M' &&
769 (p->
buf[3] ==
'1' || p->
buf[3] ==
'2'))