Browse Source

avformat/oggparseflac: check ff_alloc_extradata() return code

Fixes CID1108573
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 11 years ago
parent
commit
2c1e075308
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/oggparseflac.c

+ 2
- 1
libavformat/oggparseflac.c View File

@@ -62,7 +62,8 @@ flac_header (AVFormatContext * s, int idx)
st->codec->codec_id = AV_CODEC_ID_FLAC;
st->need_parsing = AVSTREAM_PARSE_HEADERS;

ff_alloc_extradata(st->codec, FLAC_STREAMINFO_SIZE);
if (ff_alloc_extradata(st->codec, FLAC_STREAMINFO_SIZE) < 0)
return AVERROR(ENOMEM);
memcpy(st->codec->extradata, streaminfo_start, st->codec->extradata_size);

avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);


Loading…
Cancel
Save