forked from FFmpeg/FFmpeg
avdevice/lavfi: convert to new channel layout API
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
1c22a29e1a
commit
678c1952a9
1 changed files with 5 additions and 2 deletions
|
@ -332,9 +332,12 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
|
|||
st ->sample_aspect_ratio =
|
||||
par->sample_aspect_ratio = av_buffersink_get_sample_aspect_ratio(sink);
|
||||
} else if (par->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
par->channels = av_buffersink_get_channels(sink);
|
||||
par->sample_rate = av_buffersink_get_sample_rate(sink);
|
||||
par->channel_layout = av_buffersink_get_channel_layout(sink);
|
||||
ret = av_channel_layout_from_mask(&par->ch_layout, av_buffersink_get_channel_layout(sink));
|
||||
if (ret < 0) {
|
||||
par->ch_layout.nb_channels = av_buffersink_get_channels(sink);
|
||||
par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC;
|
||||
}
|
||||
par->format = av_buffersink_get_format(sink);
|
||||
par->codec_id = av_get_pcm_codec(par->format, -1);
|
||||
if (par->codec_id == AV_CODEC_ID_NONE)
|
||||
|
|
Loading…
Add table
Reference in a new issue