fix: Fix framerate detection for mixed-framerate content (#93)
fix: Fix framerate detection for mixed-framerate content (#93)

It seems that r_frame_rate may involve some calculation when the video has more than one frame rate (mixed frame rates).  FFmpeg will try to find the least common multiple of all the different frame rates in the video, which is not the value we want.

To avoid this, we can use avg_frame_rate instead.

See https://ffmpeg.org/faq.html#AVStream_002er_005fframe_005frate-is-wrong_002c-it-is-much-larger-than-the-frame-rate_002e

Fixes #90
shaka-project/shaka-streamer,shaka-project/shaka-streamer