On date Thursday 2008-12-04 19:49:04 -0500, Franco Amato encoded:
> Hi to all,
> I have a AVFormatContext * m_context; as private member of my encoder class
> named MovieRecorder.
> This piece of code give me a segmentation fault:
> 
>     // allocate output media context
>     assert( !m_context );
>     m_context = av_alloc_format_context();
>     if ( !m_context ) {
>         LOG_ERR("MovieRecorderBase::FFmpegOpenMovie(): Cannot allocate
> format context.");
>         return;
>         }
> 
> This is done in a routine.
> The assert already cause the termination of my program

Did you initialized m_context to 0 in the constructor (sorry if it is
obvious)?

> and If I comment it I get a segmentation fault from
> av_alloc_format_context();

Try to debug it (you need to compile FFmpeg with --enable-debug=3
--disable-optimization --disable-stripping).
> 
> Any help will be appreciated.

Regards.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to