[Ffmpeg-cvslog] r7269 - trunk/libavformat/flvdec.c
michael
subversion
Sun Dec 10 18:31:17 CET 2006
Author: michael
Date: Sun Dec 10 18:31:17 2006
New Revision: 7269
Modified:
trunk/libavformat/flvdec.c
Log:
amf_get_string() by Allan Hsu allan aat counterpop doot net
Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c (original)
+++ trunk/libavformat/flvdec.c Sun Dec 10 18:31:17 2006
@@ -40,6 +40,22 @@
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)
{
More information about the ffmpeg-cvslog
mailing list