[Ffmpeg-cvslog] r7271 - trunk/libavformat/flvdec.c
michael
subversion
Sun Dec 10 18:38:16 CET 2006
Author: michael
Date: Sun Dec 10 18:38:16 2006
New Revision: 7271
Modified:
trunk/libavformat/flvdec.c
Log:
use amf_get_string()
Modified: trunk/libavformat/flvdec.c
==============================================================================
--- trunk/libavformat/flvdec.c (original)
+++ trunk/libavformat/flvdec.c Sun Dec 10 18:38:16 2006
@@ -135,20 +135,14 @@
int type, len;
double d= 0;
- len= get_be16(&s->pb);
- if(len >= sizeof(tmp) || !len)
+ if(amf_get_string(&s->pb, tmp, sizeof(tmp))<0)
break;
- get_buffer(&s->pb, tmp, len);
- tmp[len]=0;
type= get_byte(&s->pb);
if(type == AMF_DATA_TYPE_NUMBER){
d= av_int2dbl(get_be64(&s->pb));
}else if(type == AMF_DATA_TYPE_STRING){
- len= get_be16(&s->pb);
- if(len >= sizeof(tmp))
- break;
- url_fskip(&s->pb, len);
+ amf_get_string(&s->pb, NULL, 0);
}else if(type == AMF_DATA_TYPE_MIXEDARRAY){
//array
break;
More information about the ffmpeg-cvslog
mailing list