diff options
author | Paul B Mahol <onemda@gmail.com> | 2017-01-16 10:07:14 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2017-01-16 10:24:02 +0100 |
commit | 591be9e38443a01cea88db787be8a5c9a66c43a2 (patch) | |
tree | 0a240ef121df277771d8127b17c4296f0b94080b /libavformat | |
parent | e0665d385ee010866cbd93b4da1d040b5b7498b1 (diff) | |
download | ffmpeg-591be9e38443a01cea88db787be8a5c9a66c43a2.tar.gz |
avformat/aadec: use avio_get_str()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/aadec.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libavformat/aadec.c b/libavformat/aadec.c index fa4e6627c8..39dea40b80 100644 --- a/libavformat/aadec.c +++ b/libavformat/aadec.c @@ -102,16 +102,8 @@ static int aa_read_header(AVFormatContext *s) avio_skip(pb, 1); // unidentified integer nkey = avio_rb32(pb); // key string length nval = avio_rb32(pb); // value string length - if (nkey > sizeof(key)) { - avio_skip(pb, nkey); - } else { - avio_read(pb, key, nkey); // key string - } - if (nval > sizeof(val)) { - avio_skip(pb, nval); - } else { - avio_read(pb, val, nval); // value string - } + avio_get_str(pb, nkey, key, sizeof(key)); + avio_get_str(pb, nval, val, sizeof(val)); if (!strcmp(key, "codec")) { av_log(s, AV_LOG_DEBUG, "Codec is <%s>\n", val); strncpy(codec_name, val, sizeof(codec_name) - 1); |