32 int64_t pos, avail_size;
54 if (size <= avail_size)
79 int len, fill_size, size1, frame_offset,
id;
151 av_dlog(s,
"seek to %"PRIx64
" -> %"PRIx64
"\n", pos1, pos);
163 av_dlog(s,
"dts=%0.6f\n", dts / 1000000.0);
173 int64_t pos_min, pos_max;
181 pts_start =
get_dts(s, pos_min);
185 if (pts - 100000 > pts_start)
190 pts_start =
get_dts(s, pos_min);
194 if (pts - 100000 <= pts_start) {
201 if (newpos == pos_min)
206 if (newpts - 100000 <= pts) {
248 ffm->
file_size = (UINT64_C(1) << 63) - 1;
261 case MKBETAG(
'M',
'A',
'I',
'N'):
265 case MKBETAG(
'C',
'O',
'M',
'M'):
292 case MKBETAG(
'S',
'T',
'V',
'I'):
305 avio_get_str(pb, INT_MAX, rc_eq_buf,
sizeof(rc_eq_buf));
338 case MKBETAG(
'S',
'T',
'A',
'U'):
377 if (tag ==
MKTAG(
'F',
'F',
'M',
'2'))
379 if (tag !=
MKTAG(
'F',
'F',
'M',
'1'))
391 ffm->
file_size = (UINT64_C(1) << 63) - 1;
397 for(i=0;i<nb_streams;i++) {
429 avio_get_str(pb, INT_MAX, rc_eq_buf,
sizeof(rc_eq_buf));
508 av_dlog(s,
"pos=%08"PRIx64
" spos=%"PRIx64
", write_index=%"PRIx64
" size=%"PRIx64
"\n",
562 int64_t pos_min, pos_max, pos;
563 int64_t pts_min, pts_max, pts;
566 av_dlog(s,
"wanted_pts=%0.6f\n", wanted_pts / 1000000.0);
581 while (pos_min <= pos_max) {
584 if (pts_min > wanted_pts || pts_max <= wanted_pts) {
585 pos = pts_min > wanted_pts ? pos_min : pos_max;
589 pos1 = (double)(pos_max - pos_min) * (double)(wanted_pts - pts_min) /
590 (double)(pts_max - pts_min);
594 else if (pos >= pos_max)
598 if (pts == wanted_pts) {
600 }
else if (pts > wanted_pts) {
624 p->
buf[0] ==
'F' && p->
buf[1] ==
'F' && p->
buf[2] ==
'M' &&
625 (p->
buf[3] ==
'1' || p->
buf[3] ==
'2'))