summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2036f5134a..351058c968 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1291,14 +1291,16 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
st->codec->channels= 1; /* really needed */
break;
case CODEC_ID_AMR_NB:
- case CODEC_ID_AMR_WB:
- st->codec->frame_size= sc->samples_per_frame;
st->codec->channels= 1; /* really needed */
/* force sample rate for amr, stsd in 3gp does not store sample rate */
- if (st->codec->codec_id == CODEC_ID_AMR_NB)
- st->codec->sample_rate = 8000;
- else if (st->codec->codec_id == CODEC_ID_AMR_WB)
- st->codec->sample_rate = 16000;
+ st->codec->sample_rate = 8000;
+ /* force frame_size, too, samples_per_frame isn't always set properly */
+ st->codec->frame_size = 160;
+ break;
+ case CODEC_ID_AMR_WB:
+ st->codec->channels = 1;
+ st->codec->sample_rate = 16000;
+ st->codec->frame_size = 320;
break;
case CODEC_ID_MP2:
case CODEC_ID_MP3: