Changeset 1112:d75e3a6f3947 in mediastreamer2
- Timestamp:
- Jul 9, 2010 12:04:54 PM (3 years ago)
- Branch:
- default
- File:
-
- 1 edited
-
src/msspeex.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/msspeex.c
r1111 r1112 397 397 uint64_t sample_time; 398 398 void *state; 399 bool_t plc; 399 400 } DecState; 400 401 … … 406 407 s->penh=1; 407 408 s->sample_time=0; 409 s->plc=1; 408 410 f->data=s; 409 411 } … … 458 460 } 459 461 462 int dec_add_fmtp(MSFilter *f, void *arg){ 463 DecState *s=(DecState*)f->data; 464 const char *fmtp=(const char *)arg; 465 char buf[32]; 466 if (fmtp_get_value(fmtp, "plc", buf, sizeof(buf))){ 467 s->plc=atoi(buf); 468 } 469 return 0; 470 } 471 460 472 static void dec_process(MSFilter *f){ 461 473 DecState *s=(DecState*)f->data; … … 500 512 freemsg(im); 501 513 } 502 if (s-> sample_time!=0 && f->ticker->time>s->sample_time){514 if (s->plc && s->sample_time!=0 && f->ticker->time>s->sample_time){ 503 515 /* we should output a frame but no packet were decoded 504 516 thus do packet loss concealment*/ … … 515 527 static MSFilterMethod dec_methods[]={ 516 528 { MS_FILTER_SET_SAMPLE_RATE , dec_set_sr }, 529 { MS_FILTER_ADD_FMTP , dec_add_fmtp }, 517 530 { 0 , NULL } 518 531 };
Note: See TracChangeset
for help on using the changeset viewer.
