summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Coudurier <[email protected]>2008-10-03 19:37:41 +0000
committerBaptiste Coudurier <[email protected]>2008-10-03 19:37:41 +0000
commitf06188d5ee777128e7e66ca2aee0c749e3021828 (patch)
treeda7227210dead8402134e54770d5b7badfeab2a0
parent1a27fb001affd66c4028939a2e80d193b8e3545e (diff)
set sample rate for amr to allow stream copy since no decoder is present,
3gp does not store sample rate in stsd in fact. Fixes #674. Originally committed as revision 15536 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mov.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 8ff964e3c5..ec11a6855e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -991,6 +991,9 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
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_QCELP)
+ st->codec->sample_rate = 8000;
break;
case CODEC_ID_MP2:
case CODEC_ID_MP3: