Showing the changes to libavdevice (1 of 1 file). Show all
Unified · Split
| @@ -332,9 +332,12 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx) · 331 unmodified lines | |||
| 332 | st ->sample_aspect_ratio = | 332 | st ->sample_aspect_ratio = |
| 333 | par->sample_aspect_ratio = av_buffersink_get_sample_aspect_ratio(sink); | 333 | par->sample_aspect_ratio = av_buffersink_get_sample_aspect_ratio(sink); |
| 334 | } else if (par->codec_type == AVMEDIA_TYPE_AUDIO) { | 334 | } else if (par->codec_type == AVMEDIA_TYPE_AUDIO) { |
| 335 | par->channels = av_buffersink_get_channels(sink); | ||
| 336 | par->sample_rate = av_buffersink_get_sample_rate(sink); | 335 | par->sample_rate = av_buffersink_get_sample_rate(sink); |
| 337 | par->channel_layout = av_buffersink_get_channel_layout(sink); | 336 | ret = av_channel_layout_from_mask(&par->ch_layout, av_buffersink_get_channel_layout(sink)); |
| 337 | if (ret < 0) { | ||
| 338 | par->ch_layout.nb_channels = av_buffersink_get_channels(sink); | ||
| 339 | par->ch_layout.order = AV_CHANNEL_ORDER_UNSPEC; | ||
| 340 | } | ||
| 338 | par->format = av_buffersink_get_format(sink); | 341 | par->format = av_buffersink_get_format(sink); |
| 339 | par->codec_id = av_get_pcm_codec(par->format, -1); | 342 | par->codec_id = av_get_pcm_codec(par->format, -1); |
| 340 | if (par->codec_id == AV_CODEC_ID_NONE) | 343 | if (par->codec_id == AV_CODEC_ID_NONE) |