Mercurial > libavformat.hg
comparison amr.c @ 6456:8743935975f2 libavformat
Set frame_size in the amr demuxer
author | mstorsjo |
---|---|
date | Fri, 03 Sep 2010 14:59:18 +0000 |
parents | 536e5527c1e0 |
children |
comparison
equal
deleted
inserted
replaced
6455:3f50c7effad1 | 6456:8743935975f2 |
---|---|
98 } | 98 } |
99 | 99 |
100 st->codec->codec_tag = MKTAG('s', 'a', 'w', 'b'); | 100 st->codec->codec_tag = MKTAG('s', 'a', 'w', 'b'); |
101 st->codec->codec_id = CODEC_ID_AMR_WB; | 101 st->codec->codec_id = CODEC_ID_AMR_WB; |
102 st->codec->sample_rate = 16000; | 102 st->codec->sample_rate = 16000; |
103 st->codec->frame_size = 320; | |
103 } | 104 } |
104 else | 105 else |
105 { | 106 { |
106 st->codec->codec_tag = MKTAG('s', 'a', 'm', 'r'); | 107 st->codec->codec_tag = MKTAG('s', 'a', 'm', 'r'); |
107 st->codec->codec_id = CODEC_ID_AMR_NB; | 108 st->codec->codec_id = CODEC_ID_AMR_NB; |
108 st->codec->sample_rate = 8000; | 109 st->codec->sample_rate = 8000; |
110 st->codec->frame_size = 160; | |
109 } | 111 } |
110 st->codec->channels = 1; | 112 st->codec->channels = 1; |
111 st->codec->codec_type = AVMEDIA_TYPE_AUDIO; | 113 st->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
112 av_set_pts_info(st, 64, 1, st->codec->sample_rate); | 114 av_set_pts_info(st, 64, 1, st->codec->sample_rate); |
113 | 115 |