core: differentiate mp2 from mp3 audio layers

ref #10318
differentiate mpga (layer 2) and mp3 (layer 3) codecs

Fixes #10318
demux: avformat: use CLOCK_FREQ
Merge remote-tracking branch: upstream/master