changeset 3974:a8383d02c686 libavformat

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.
author bcoudurier
date Fri, 03 Oct 2008 19:37:41 +0000
parents 549a09cf23fe
children 44561554cb7e
files mov.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Fri Oct 03 10:16:29 2008 +0000
+++ b/mov.c	Fri Oct 03 19:37:41 2008 +0000
@@ -991,6 +991,9 @@
     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: