(1)av_rescale_q(int a,R b,R q) 等价 a * b * (1/q)
(2)mp3 spf = 576: 1152
(3)url_fseek()
{
s->seek();
s->buf_ptr = s->buffer; //当前地址指向缓冲区开始处
}
get_buffer
{
if(size > s->buffer_size && !s->update_checksum) //需要的数据量大于缓冲区大小就直接从源读取
{
if(s->read_packet)
len = s->read_packet(s->opaque, buf, size);
if (len <= 0)
{
/* do not modify buffer if EOF reached so that a seek back can
be done without rereading data */
s->eof_reached = 1;
if(len<0)
s->error= len;
break;
}
else
{
s->pos += len;
size -= len;
buf += len;
s->buf_ptr = s->buffer; //当前地址和结尾地址都指向缓冲区开始处
s->buf_end = s->buffer/* + len*/;
}
}