crashes in vtkFFMPEGWriter on End()
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The vtkIOFFMPEG-6.0.dll crashes on vtkFFMPEGWriterInternal::End() at the "av_free(this->yuvOutput->data[0]);" line. The crashing is consistent using MS Visual Studio 2005 (x64).
The reason seems to be that the data buffer is allocated in vtkFFMPEGWriterInternal::Start() using a new[] then fed into the AVFrame structure using avpicture_fill. One possible fix that works is to replace the offending line with "delete[] this->yuvOutput->data[0];". The same needs to be done with the "av_free(this->rgbInput->data[0]);" line.
Not related to the crash, but the lines "av_free(this->yuvOutput);" and "av_free(this->rgbInput);" in vtkFFMPEGWriterInternal::End() should probably use the avcodec_free_frame function instead of av_free.