[FFmpeg-cvslog] tools/uncoded_frame: fix double free
Lukasz Marek
git at videolan.org
Thu Feb 13 01:30:32 CET 2014
ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki at gmail.com> | Wed Feb 12 21:16:16 2014 +0100| [9c3478c2343424907b0d8c88da917c56a4cd9162] | committer: Michael Niedermayer
tools/uncoded_frame: fix double free
in case av_interleaved_write_uncoded_frame fails it seems
frame is freed for the second time in fail section.
Signed-off-by: Lukasz Marek <lukasz.m.luki at gmail.com>
Reviewed-by: Nicolas George <george at nsup.org>
This commit also removes 1 trailing whitespace as otherwise the push hook rejects it
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9c3478c2343424907b0d8c88da917c56a4cd9162
---
tools/uncoded_frame.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/uncoded_frame.c b/tools/uncoded_frame.c
index da04d06..eafbbfd 100644
--- a/tools/uncoded_frame.c
+++ b/tools/uncoded_frame.c
@@ -182,7 +182,7 @@ int main(int argc, char **argv)
st->stream->codec->channel_layout = st->link->channel_layout;
st->stream->codec->channels = avfilter_link_get_channels(st->link);
st->stream->codec->sample_rate = st->link->sample_rate;
- st->stream->codec->sample_fmt = st->link->format;
+ st->stream->codec->sample_fmt = st->link->format;
break;
default:
av_assert0(!"reached");
@@ -245,12 +245,12 @@ int main(int argc, char **argv)
ret = av_interleaved_write_uncoded_frame(st->mux,
st->stream->index,
frame);
+ frame = NULL;
if (ret < 0) {
av_log(st->stream->codec, AV_LOG_ERROR,
"Error writing frame: %s\n", av_err2str(ret));
goto fail;
}
- frame = NULL;
}
}
}
More information about the ffmpeg-cvslog
mailing list