Factor out the code into a separate muxing-specific function.
Stop accessing the deprecated AVStream-embedded codec context, use the
average framerate (if specified) instead.
Previously alac encoder was used, from a first glance I thought it is bitexact,
but it turns out it is using floating point arithmetic as well, so probably it
is not. Fixes fate failures on mingw32/64.
Signed-off-by: Marton Balint <cus@passwd.hu>