Commit 74436ad5 authored by Michael Niedermayer's avatar Michael Niedermayer

libnut: NULL priv->nut after nut_demuxer_uninit() as a saftey precaution.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e21f8a07
......@@ -213,6 +213,7 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
if ((ret = nut_read_headers(nut, &s, NULL))) {
av_log(avf, AV_LOG_ERROR, " NUT error: %s\n", nut_error(ret));
nut_demuxer_uninit(nut);
priv->nut = NULL;
return -1;
}
......@@ -231,6 +232,7 @@ static int nut_read_header(AVFormatContext * avf, AVFormatParameters * ap) {
st->codec->extradata = av_mallocz(st->codec->extradata_size);
if(!st->codec->extradata){
nut_demuxer_uninit(nut);
priv->nut = NULL;
return AVERROR(ENOMEM);
}
memcpy(st->codec->extradata, s[i].codec_specific, st->codec->extradata_size);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment