OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b59740e
)
avformat/apc: use ff_get_extradata()
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 25 Dec 2013 15:37:42 +0000
(16:37 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 25 Dec 2013 16:14:32 +0000
(17:14 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/apc.c
patch
|
blob
|
history
diff --git
a/libavformat/apc.c
b/libavformat/apc.c
index
08ae935
..
21bb514
100644
(file)
--- a/
libavformat/apc.c
+++ b/
libavformat/apc.c
@@
-52,11
+52,9
@@
static int apc_read_header(AVFormatContext *s)
avio_rl32(pb); /* number of samples */
st->codec->sample_rate = avio_rl32(pb);
- if (ff_alloc_extradata(st->codec, 2 * 4))
- return AVERROR(ENOMEM);
-
/* initial predictor values for adpcm decoder */
- avio_read(pb, st->codec->extradata, 2 * 4);
+ if (ff_get_extradata(st->codec, pb, 2 * 4) < 0)
+ return AVERROR(ENOMEM);
if (avio_rl32(pb)) {
st->codec->channels = 2;