2008/12/30 Michael Tison <[email protected]> > On Tue, Dec 30, 2008 at 1:04 PM, Franco Amato <[email protected]> > wrote: > > 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 > > > > protected: > > AVStream* m_audioStream; > > > > When I stop encoding I call the method CloseAudioEncoder so: > > > > MyClass::CloseAudioEncoder() > > { > > 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? > > Regards, > > Franco > > Ensure that the format context it's connected to isn't freed at that > point
How? Can I have some lines of code? > and that m_audioStream->codec->codec != NULL. Yes it's null...very strange > > > Hopefully that helps. I've had a lot of seg-faults with > avcodec_close() before :) Thanx Franco > > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
