mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-12-04 01:01:30 +00:00
wtv: clean memory on error
CC: libav-stable@libav.org Bug-Id: CID 718002
This commit is contained in:
parent
9fbc613f0d
commit
7b48bf9524
@ -632,8 +632,10 @@ static AVStream * new_stream(AVFormatContext *s, AVStream *st, int sid, int code
|
||||
if (!wst)
|
||||
return NULL;
|
||||
st = avformat_new_stream(s, NULL);
|
||||
if (!st)
|
||||
if (!st) {
|
||||
av_free(wst);
|
||||
return NULL;
|
||||
}
|
||||
st->id = sid;
|
||||
st->priv_data = wst;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user