[FFmpeg-devel] Segmentation fault on avcodec_close()

Franco Amato ffrank1975
Tue Dec 30 22:04:28 CET 2008

Hi to all,
I'm writing a class for encoding audio/video.
The problem comes when I release the codec with avcodec_close.

I have as protected member of my class an audio stream

AVStream* m_audioStream;

When I stop encoding I call the method CloseAudioEncoder so:

  avcodec_close(m_audioStream->codec); //<---- this give to me a
segmentation fault error (detected with valdrind)
  ...more code...

 ...more code...

Can I have an help to solve my problem?

More information about the ffmpeg-devel mailing list