there were 241817 P frames of ~18KB each. Basically 4GB (32bits) isn't
enough when building m2v files destined for a dual layer disk.
Fix was to use int64_t for the avg_frames array and then cast the average
size to (int). It is highly unlikely that the average frame size will
exceed an 'int'.