do not setup codec context after open

setup must be done before avctx open
TODO:
redesign decoder and demuxer. demuxer should only parse stream and get
info, not setup and open decoder.
set stream before open. use default stream if file changed

TODO:
add a test