mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
amf_get_string() by Allan Hsu allan aat counterpop doot net
Originally committed as revision 7269 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
4eb0c66505
commit
896bcd2e85
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user