Commit 99bab744 authored by michael's avatar michael

amf_get_string() by Allan Hsu allan aat counterpop doot net


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7269 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent c1964a96
......@@ -40,6 +40,22 @@ static int flv_probe(AVProbeData *p)
return 0;
}
static int amf_get_string(ByteIOContext *ioc, char *buffer, int buffsize) {
int length;
length = get_be16(ioc);
if(length >= buffsize) {
url_fskip(ioc, length);
return -1; //string will not fit in buffer
}
get_buffer(ioc, buffer, length);
buffer[length] = '\0';
return length;
}
static int flv_read_header(AVFormatContext *s,
AVFormatParameters *ap)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment