~ubuntu-branches/ubuntu/raring/libav/raring-security

« back to all changes in this revision

Viewing changes to libavdevice/alsa-audio-common.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2011-09-28 09:18:34 UTC
  • mfrom: (1.3.7 sid)
  • Revision ID: package-import@ubuntu.com-20110928091834-w415mnuh06h4zpvc
Tags: 4:0.7.1-7ubuntu2
Revert "Convert package to include multiarch support."

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
    }
138
138
 
139
139
    snd_pcm_hw_params_get_buffer_size_max(hw_params, &buffer_size);
 
140
    buffer_size = FFMIN(buffer_size, ALSA_BUFFER_SIZE_MAX);
140
141
    /* TODO: maybe use ctx->max_picture_buffer somehow */
141
142
    res = snd_pcm_hw_params_set_buffer_size_near(h, hw_params, &buffer_size);
142
143
    if (res < 0) {
146
147
    }
147
148
 
148
149
    snd_pcm_hw_params_get_period_size_min(hw_params, &period_size, NULL);
 
150
    if (!period_size)
 
151
        period_size = buffer_size / 4;
149
152
    res = snd_pcm_hw_params_set_period_size_near(h, hw_params, &period_size, NULL);
150
153
    if (res < 0) {
151
154
        av_log(ctx, AV_LOG_ERROR, "cannot set ALSA period size (%s)\n",