mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 04:17:05 +00:00
amr: set channel_layout
This commit is contained in:
parent
a384f6a7f7
commit
5595368bcc
@ -25,6 +25,8 @@ Write and read amr data according to RFC3267, http://www.ietf.org/rfc/rfc3267.tx
|
|||||||
Only mono files are supported.
|
Only mono files are supported.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "libavutil/channel_layout.h"
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
@ -97,6 +99,7 @@ static int amr_read_header(AVFormatContext *s)
|
|||||||
st->codec->sample_rate = 8000;
|
st->codec->sample_rate = 8000;
|
||||||
}
|
}
|
||||||
st->codec->channels = 1;
|
st->codec->channels = 1;
|
||||||
|
st->codec->channel_layout = AV_CH_LAYOUT_MONO;
|
||||||
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
|
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||||
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
|
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user