title: Are the av_free* functions in ffmpeg idempotent?
body: <p>Specifically I'm looking at <code>avformat_free_context</code>.  In normal execution of my code, <code>avformat_free_context</code> is called appropriately.  I would also like to call it in the destructor of a class, in case there was an exceptional case that caused the code using the <code>AVFormatContext</code> to return early.  Do the ffmpeg free functions behave appropriately when called on already freed data structures?</p>