[FFmpeg-devel] libswresample swr_compensate and swr_init

Michael Niedermayer michaelni at gmx.at
Sat Jan 7 15:23:36 CET 2012

On Sat, Jan 07, 2012 at 12:28:11PM +0100, Marton Balint wrote:
> Hi,
> Currently swr_init() does not create the resampler, if the input and
> output frequency matches. But swr_compensate() expects the resampler
> to exist, and it crashes if it does not.
> So what should be done here?
> a) if the user plans to use swr_compensate then he should pass the
> SWR_FLAG_RESAMPLE flag to swr_init, and we should mention this
> requirement in the documentation. Also fix swr_compensate not to
> crash but log an error message if the resampler does not exist.
> (Unfortunately the return type of that function is void...)
> b) fix swr_compensate to create the resampler by itself if
> necessary. Again the return type of swr_compensate is void, so
> extending the API may be required for this.
> c) some other way :)

> I'd vote for plan b)

i agree, plan b is best

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120107/79efcafd/attachment.asc>

More information about the ffmpeg-devel mailing list