fix crash when open/close decoder is called.

open and close codec with ffmpeg api is not thread safe unless we enable
lock manager. av_find_stream_info will call open. shall we enable lock
mgr?