success = audio_callback(buffer.get(), frames, audio_format, pts - prev_pts, now);
} while (!success);
num_frames_output += frames;
success = audio_callback(buffer.get(), frames, audio_format, pts - prev_pts, now);
} while (!success);
num_frames_output += frames;