Commit 1e51af13 authored by Michael Niedermayer's avatar Michael Niedermayer

avdevice/pulse_audio_enc: use getter function for AVFrame.channels

This is required by the API/ABI for things outside libavutil
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent d554d004
......@@ -681,7 +681,7 @@ static int pulse_write_frame(AVFormatContext *h, int stream_index,
AVERROR(EINVAL) : 0;
pkt.data = (*frame)->data[0];
pkt.size = (*frame)->nb_samples * av_get_bytes_per_sample((*frame)->format) * (*frame)->channels;
pkt.size = (*frame)->nb_samples * av_get_bytes_per_sample((*frame)->format) * av_frame_get_channels(*frame);
pkt.dts = (*frame)->pkt_dts;
pkt.duration = av_frame_get_pkt_duration(*frame);
return pulse_write_packet(h, &pkt);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment