Ticket #586: ffmpeg-resample-dst_size.patch

File ffmpeg-resample-dst_size.patch, 656 bytes (added by radford, 8 years ago)

Patch to fix unit mismatch in call to av_resample

  • ffmpeg-0.8.5/libavcodec/resample.c

     
    376376        int is_last = i + 1 == s->filter_channels;
    377377
    378378        nb_samples1 = av_resample(s->resample_context, buftmp3[i], bufin[i],
    379                                   &consumed, nb_samples, lenout, is_last);
     379                                  &consumed, nb_samples, lenout/2, is_last);
    380380        s->temp_len = nb_samples - consumed;
    381381        s->temp[i] = av_realloc(s->temp[i], s->temp_len * sizeof(short));
    382382        memcpy(s->temp[i], bufin[i] + consumed, s->temp_len * sizeof(short));