remove unused variable warning when logging macros are 'disabled'.
should be optimized away by compiler so no-net change in performance.
avformat_close_input frees context, so we need to make sure we don't use
it after it's been freed. Tests included.
make compile in later C++ compilers