mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-26 08:41:38 +00:00
use amf_get_string()
Originally committed as revision 7271 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
759dd138df
commit
17fcb1709f
@ -135,20 +135,14 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
int type, len;
|
int type, len;
|
||||||
double d= 0;
|
double d= 0;
|
||||||
|
|
||||||
len= get_be16(&s->pb);
|
if(amf_get_string(&s->pb, tmp, sizeof(tmp))<0)
|
||||||
if(len >= sizeof(tmp) || !len)
|
|
||||||
break;
|
break;
|
||||||
get_buffer(&s->pb, tmp, len);
|
|
||||||
tmp[len]=0;
|
|
||||||
|
|
||||||
type= get_byte(&s->pb);
|
type= get_byte(&s->pb);
|
||||||
if(type == AMF_DATA_TYPE_NUMBER){
|
if(type == AMF_DATA_TYPE_NUMBER){
|
||||||
d= av_int2dbl(get_be64(&s->pb));
|
d= av_int2dbl(get_be64(&s->pb));
|
||||||
}else if(type == AMF_DATA_TYPE_STRING){
|
}else if(type == AMF_DATA_TYPE_STRING){
|
||||||
len= get_be16(&s->pb);
|
amf_get_string(&s->pb, NULL, 0);
|
||||||
if(len >= sizeof(tmp))
|
|
||||||
break;
|
|
||||||
url_fskip(&s->pb, len);
|
|
||||||
}else if(type == AMF_DATA_TYPE_MIXEDARRAY){
|
}else if(type == AMF_DATA_TYPE_MIXEDARRAY){
|
||||||
//array
|
//array
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user