There is a very simple solution to the final problem: just replace the call to av_close_input_stream() in ffdecode.c with a call to av_close_input_file() instead (see attached patch).
There is a very simple solution to the final problem: just replace the call to av_close_ input_stream( ) in ffdecode.c with a call to av_close_ input_file( ) instead (see attached patch).