better media buffer handling