aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-25 16:37:42 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-25 17:38:30 +0100
commit2e2cab6e4f10b1273e6f858a316143da78df13d5 (patch)
tree7e0e29c029bc339a1ad0c6b9d7a028745c17d740
parentfd335aa3260d89775e3975d1c28738e79ba4d9d9 (diff)
downloadffmpeg-2e2cab6e4f10b1273e6f858a316143da78df13d5.tar.gz
avformat/rsd: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/rsd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavformat/rsd.c b/libavformat/rsd.c
index 341f638c77..b6f168633b 100644
--- a/libavformat/rsd.c
+++ b/libavformat/rsd.c
@@ -104,13 +104,10 @@ static int rsd_read_header(AVFormatContext *s)
/* RSD3GADP is mono, so only alloc enough memory
to store the coeff table for a single channel. */
- if (ff_alloc_extradata(codec, 32))
- return AVERROR(ENOMEM);
-
start = avio_rl32(pb);
- if (avio_read(s->pb, codec->extradata, 32) != 32)
- return AVERROR_INVALIDDATA;
+ if (ff_get_extradata(codec, s->pb, 32) < 0)
+ return AVERROR(ENOMEM);
for (i = 0; i < 16; i++)
AV_WB16(codec->extradata + i * 2, AV_RL16(codec->extradata + i * 2));