comparison mov.c @ 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 0b65c21ef10f
children f4fcd39c5d7f
comparison
equal deleted inserted replaced
3244:4c537c1fb020 3245:9f25267bee44
920 /* no ifdef since parameters are always those */ 920 /* no ifdef since parameters are always those */
921 case CODEC_ID_AMR_WB: 921 case CODEC_ID_AMR_WB:
922 st->codec->sample_rate= 16000; 922 st->codec->sample_rate= 16000;
923 st->codec->channels= 1; /* really needed */ 923 st->codec->channels= 1; /* really needed */
924 break; 924 break;
925 case CODEC_ID_QCELP:
926 st->codec->frame_size = sc->samples_per_frame;
927 st->need_parsing= AVSTREAM_PARSE_FULL;
925 case CODEC_ID_AMR_NB: 928 case CODEC_ID_AMR_NB:
926 st->codec->sample_rate= 8000; 929 st->codec->sample_rate= 8000;
927 st->codec->channels= 1; /* really needed */ 930 st->codec->channels= 1; /* really needed */
928 break; 931 break;
929 case CODEC_ID_MP2: 932 case CODEC_ID_MP2:
1250 sc->time_rate=1; 1253 sc->time_rate=1;
1251 if(!sc->time_scale) 1254 if(!sc->time_scale)
1252 sc->time_scale= c->time_scale; 1255 sc->time_scale= c->time_scale;
1253 av_set_pts_info(st, 64, sc->time_rate, sc->time_scale); 1256 av_set_pts_info(st, 64, sc->time_rate, sc->time_scale);
1254 1257
1255 if (st->codec->codec_type == CODEC_TYPE_AUDIO && sc->stts_count == 1) 1258 if (st->codec->codec_type == CODEC_TYPE_AUDIO &&
1259 !st->codec->frame_size && sc->stts_count == 1)
1256 st->codec->frame_size = av_rescale(sc->time_rate, st->codec->sample_rate, sc->time_scale); 1260 st->codec->frame_size = av_rescale(sc->time_rate, st->codec->sample_rate, sc->time_scale);
1257 1261
1258 if(st->duration != AV_NOPTS_VALUE){ 1262 if(st->duration != AV_NOPTS_VALUE){
1259 assert(st->duration % sc->time_rate == 0); 1263 assert(st->duration % sc->time_rate == 0);
1260 st->duration /= sc->time_rate; 1264 st->duration /= sc->time_rate;