From: Carl Eugen Hoyos <[email protected]>

The amr demuxer also sets the frame_size field.
---
 libavformat/mov.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2036f51..131e2b4 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1295,10 +1295,13 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext 
*pb, int entries)
         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)
+        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->frame_size  = 160;
+        } else if (st->codec->codec_id == CODEC_ID_AMR_WB) {
             st->codec->sample_rate = 16000;
+            st->codec->frame_size  = 320;
+        }
         break;
     case CODEC_ID_MP2:
     case CODEC_ID_MP3:
-- 
1.7.3.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to