Browse Source

gsmdec: set channel layout

tags/n1.1
Justin Ruggles 13 years ago
parent
commit
d4a105ae5c
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/gsmdec.c

+ 2
- 0
libavformat/gsmdec.c View File

@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/ */


#include "libavutil/channel_layout.h"
#include "libavutil/mathematics.h" #include "libavutil/mathematics.h"
#include "libavutil/opt.h" #include "libavutil/opt.h"
#include "avformat.h" #include "avformat.h"
@@ -64,6 +65,7 @@ static int gsm_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_id = s->iformat->raw_codec_id; st->codec->codec_id = s->iformat->raw_codec_id;
st->codec->channels = 1; st->codec->channels = 1;
st->codec->channel_layout = AV_CH_LAYOUT_MONO;
st->codec->sample_rate = c->sample_rate; st->codec->sample_rate = c->sample_rate;
st->codec->bit_rate = GSM_BLOCK_SIZE * 8 * c->sample_rate / GSM_BLOCK_SAMPLES; st->codec->bit_rate = GSM_BLOCK_SIZE * 8 * c->sample_rate / GSM_BLOCK_SAMPLES;




Loading…
Cancel
Save