mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/rmdec: use ff_get_extradata()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
61883a2e89
commit
fd335aa326
@ -86,11 +86,8 @@ static int rm_read_extradata(AVIOContext *pb, AVCodecContext *avctx, unsigned si
|
|||||||
{
|
{
|
||||||
if (size >= 1<<24)
|
if (size >= 1<<24)
|
||||||
return -1;
|
return -1;
|
||||||
if (ff_alloc_extradata(avctx, size))
|
if (ff_get_extradata(avctx, pb, size) < 0)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
avctx->extradata_size = avio_read(pb, avctx->extradata, size);
|
|
||||||
if (avctx->extradata_size != size)
|
|
||||||
return AVERROR(EIO);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user