I've tried to scan my folders using a Qnap TS-409 (debian/armel wheezy) but during scan minidlna crash on some videos.
After investigation I found that the function "av_find_stream_info" in getVideoMetadata() is the reason why minidlna is crashing. I've made my tests with libavformat 0.5.2 and 0.6.1 and this is still the same. This not a bug on your side but I was wondering why you are using this function as the av_open_input_file function already return information about streams.
So in in my case I've just commented the call to av_find_stream_info and minidlna is working perfectly.
Maybe this call is needed for old versions of libavformat or sometimes the function av_open_input_file don't return any stream information?