Commit 314f3d84 authored by Roman Donchenko's avatar Roman Donchenko Committed by OpenCV Buildbot

Merge pull request #1246 from StevenPuttemans:bugfix_3206

parents 8d39350b d11746e5
......@@ -1362,8 +1362,6 @@ bool CvVideoWriter_FFMPEG::writeFrame( const unsigned char* data, int step, int
/// close video output stream and free associated memory
void CvVideoWriter_FFMPEG::close()
{
unsigned i;
// nothing to do if already released
if ( !picture )
return;
......@@ -1419,13 +1417,6 @@ void CvVideoWriter_FFMPEG::close()
av_free(outbuf);
/* free the streams */
for(i = 0; i < oc->nb_streams; i++)
{
av_freep(&oc->streams[i]->codec);
av_freep(&oc->streams[i]);
}
if (!(fmt->flags & AVFMT_NOFILE))
{
/* close the output file */
......@@ -1443,7 +1434,7 @@ void CvVideoWriter_FFMPEG::close()
}
/* free the stream */
av_free(oc);
avformat_free_context(oc);
if( temp_image.data )
{
......
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