Discussion:
[Libav-user] swr_convert_frame crashes when it is supposed to do nothing
Rossenbach, Nick
2018-11-22 15:48:33 UTC
Permalink
Hello everyone,


i used swr_convert_frame(internal_->swr_ctx, out_frame, frame) to convert frames from planar format to packed, by using

out_frame->format = av_get_packed_sample_fmt(static_cast<AVSampleFormat>(frame->format)); beforehand. When there is nothing to do,

meaning the file is single channel and i do not adjust the sampling rate, the swr_convert call crashes. If i change the sampling rate in the same call, it does not crash.


As workaround i just set the format manually to the packed counterpart without using swr_convert_frame (for single channel cases), but is this behavior intended?


best,

Nick

Loading...