mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 19:49:56 +00:00
sol: set channel layout
This commit is contained in:
parent
bfccd76adb
commit
1c7587728c
@ -23,6 +23,7 @@
|
|||||||
* Based on documents from Game Audio Player and own research
|
* Based on documents from Game Audio Player and own research
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "libavutil/channel_layout.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
@ -116,6 +117,8 @@ static int sol_read_header(AVFormatContext *s)
|
|||||||
st->codec->codec_tag = id;
|
st->codec->codec_tag = id;
|
||||||
st->codec->codec_id = codec;
|
st->codec->codec_id = codec;
|
||||||
st->codec->channels = channels;
|
st->codec->channels = channels;
|
||||||
|
st->codec->channel_layout = channels == 1 ? AV_CH_LAYOUT_MONO :
|
||||||
|
AV_CH_LAYOUT_STEREO;
|
||||||
st->codec->sample_rate = rate;
|
st->codec->sample_rate = rate;
|
||||||
avpriv_set_pts_info(st, 64, 1, rate);
|
avpriv_set_pts_info(st, 64, 1, rate);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user