fix swr_convert buffering of packed audio
authorAndrew Wason <rectalogic@rectalogic.com>
Fri, 20 Apr 2012 21:06:25 +0000 (17:06 -0400)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 20 Apr 2012 23:57:21 +0000 (01:57 +0200)
commite9b1d5ae5e41b854a9d8d212e9e197a193ff1fa9
tree51edaaa778441ecfbe4880e154eb5997b4aa3e75
parenta812b599b504b39a8021827da89d5e23fb361cc9
fix swr_convert buffering of packed audio

swr_convert is not properly buffering packed input audio when the
output is not large enough, and when resampling is not actually needed
(same samplerate and no SWR_FLAG_RESAMPLE).

buf_set() is only handling the first channel and leaving the others as-is.

Sample program to reproduce the problem is here https://gist.github.com/2431768

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libswresample/swresample.c