changeset 3245:9f25267bee44 libavformat

demux qcelp, so this can work with soc decoder and stream copy
author bcoudurier
date Thu, 24 Apr 2008 17:17:41 +0000
parents 4c537c1fb020
children a6a78c1cbf33
files mov.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Thu Apr 24 17:16:13 2008 +0000
+++ b/mov.c	Thu Apr 24 17:17:41 2008 +0000
@@ -922,6 +922,9 @@
         st->codec->sample_rate= 16000;
         st->codec->channels= 1; /* really needed */
         break;
+    case CODEC_ID_QCELP:
+        st->codec->frame_size = sc->samples_per_frame;
+        st->need_parsing= AVSTREAM_PARSE_FULL;
     case CODEC_ID_AMR_NB:
         st->codec->sample_rate= 8000;
         st->codec->channels= 1; /* really needed */
@@ -1252,7 +1255,8 @@
         sc->time_scale= c->time_scale;
     av_set_pts_info(st, 64, sc->time_rate, sc->time_scale);
 
-    if (st->codec->codec_type == CODEC_TYPE_AUDIO && sc->stts_count == 1)
+    if (st->codec->codec_type == CODEC_TYPE_AUDIO &&
+        !st->codec->frame_size && sc->stts_count == 1)
         st->codec->frame_size = av_rescale(sc->time_rate, st->codec->sample_rate, sc->time_scale);
 
     if(st->duration != AV_NOPTS_VALUE){