mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-01 09:27:44 +00:00
decode latency patch by (Leon van Stuivenberg <l dot vanstuivenberg at chello dot nl>)
Originally committed as revision 2896 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
6cc270c2ac
commit
e15dec10d5
3 changed files with 42 additions and 6 deletions
|
@ -309,6 +309,22 @@ int get_buffer(ByteIOContext *s, unsigned char *buf, int size)
|
|||
return size1 - size;
|
||||
}
|
||||
|
||||
int get_partial_buffer(ByteIOContext *s, unsigned char *buf, int size)
|
||||
{
|
||||
int len;
|
||||
|
||||
len = s->buf_end - s->buf_ptr;
|
||||
if (len == 0) {
|
||||
fill_buffer(s);
|
||||
len = s->buf_end - s->buf_ptr;
|
||||
}
|
||||
if (len > size)
|
||||
len = size;
|
||||
memcpy(buf, s->buf_ptr, len);
|
||||
s->buf_ptr += len;
|
||||
return len;
|
||||
}
|
||||
|
||||
unsigned int get_le16(ByteIOContext *s)
|
||||
{
|
||||
unsigned int val;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue