diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-12-10 17:38:16 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-12-10 17:38:16 +0000 |
commit | 17fcb1709fd04433a05c6f60023856eebf817dd5 (patch) | |
tree | 6441ddd18cf3db197d6ce86c7f5fe2a78b3eac93 /libavformat | |
parent | 759dd138dfa103ad27360a7d9cae6b87b9af4aa6 (diff) | |
download | ffmpeg-17fcb1709fd04433a05c6f60023856eebf817dd5.tar.gz |
use amf_get_string()
Originally committed as revision 7271 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/flvdec.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index 4c1c9624ee..c49fe8eae7 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -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; |