Fixed subsample size adjustment in AVC AnnexB conversion
This is a bugfix for crbug.com/519955: The code that updates subsample
sizes in MP4StreamParser::PrepareAVCBuffer is incorrect. It works
correctly only for cases when avc_config.length_size is 4 (which is
actually almost all real-life uses of this code) and when there is only
one NALU per subsample for cases when avc_config.length_size is 1 or 2.
For cases when avc_config.length_size is 1 or 2 and there are multiple
NALUs in some subsample, the calculations are incorrect, we actually
need to update subsample sizes based on how many NALUs were encountered
in each subsample (since AVC::ConvertFrameToAnnexB replaces NALU size
values read from mp4 container with 4-bytes AnnexB codes for each NALU).
BUG=519955
Review URL: https://codereview.chromium.org/
1289733002
Cr-Commit-Position: refs/heads/master@{#343287}