[FFmpeg-cvslog] avformat/mpc: use ff_get_extradata()

Michael Niedermayer git at videolan.org
Wed Dec 25 17:48:54 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 25 16:37:42 2013 +0100| [a1ce41c9a4ec8cf9eb8a4944e4188a51b88fbd70] | committer: Michael Niedermayer

avformat/mpc: use ff_get_extradata()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a1ce41c9a4ec8cf9eb8a4944e4188a51b88fbd70
---

 libavformat/mpc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/libavformat/mpc.c b/libavformat/mpc.c
index 8abc488..c3faebe 100644
--- a/libavformat/mpc.c
+++ b/libavformat/mpc.c
@@ -95,9 +95,8 @@ static int mpc_read_header(AVFormatContext *s)
     st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
     st->codec->bits_per_coded_sample = 16;
 
-    if (ff_alloc_extradata(st->codec, 16))
+    if (ff_get_extradata(st->codec, s->pb, 16) < 0)
         return AVERROR(ENOMEM);
-    avio_read(s->pb, st->codec->extradata, 16);
     st->codec->sample_rate = mpc_rate[st->codec->extradata[2] & 3];
     avpriv_set_pts_info(st, 32, MPC_FRAMESIZE, st->codec->sample_rate);
     /* scan for seekpoints */



More information about the ffmpeg-cvslog mailing list