cannot free AVStream like this, and return ENOMEM
Originally committed as revision 12529 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
e3c4740fd4
commit
2922cbdb14
@ -1204,10 +1204,7 @@ static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
|||||||
st = av_new_stream(c->fc, c->fc->nb_streams);
|
st = av_new_stream(c->fc, c->fc->nb_streams);
|
||||||
if (!st) return -2;
|
if (!st) return -2;
|
||||||
sc = av_mallocz(sizeof(MOVStreamContext));
|
sc = av_mallocz(sizeof(MOVStreamContext));
|
||||||
if (!sc) {
|
if (!sc) return AVERROR(ENOMEM);
|
||||||
av_free(st);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
st->priv_data = sc;
|
st->priv_data = sc;
|
||||||
st->codec->codec_type = CODEC_TYPE_DATA;
|
st->codec->codec_type = CODEC_TYPE_DATA;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user