Prefer newer av_get_bits_per_sample_fmt over av_get_bits_per_sample_format.
drop debug fprintf()
remove unneeded null check
fix error check for muxer
dont try to mux a packet if the encoder didnt output one
no timestamps are being input in the encoder, thus dont output any

this fixes muxing to libvorbis, and possibly others
some saftey checks on buffer sizes