Browse Source

use amf_get_string()

Originally committed as revision 7271 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 19 years ago
parent
commit
17fcb1709f
1 changed files with 2 additions and 8 deletions
  1. +2
    -8
      libavformat/flvdec.c

+ 2
- 8
libavformat/flvdec.c View File

@@ -135,20 +135,14 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
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;


Loading…
Cancel
Save