Commit b3b4e324 authored by Sandrine Avakian's avatar Sandrine Avakian

Merge branch 'master' of git.linphone.org:mediastreamer2 into dev_msfactory

parents 2e8c945a ec5651bc
......@@ -35,6 +35,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "g722.h"
#endif
#define ENABLE_PCM_RESCALING 0
struct EncState {
g722_encode_state_t *state;
uint32_t ts;
......@@ -62,12 +64,15 @@ static void enc_uninit(MSFilter *f)
};
static void scale_down(int16_t *samples, int count){
#if ENABLE_PCM_RESCALING
int i;
for (i=0;i<count;++i)
samples[i]=samples[i]>>1;
#endif
}
static void scale_up(int16_t *samples, int count){
#if ENABLE_PCM_RESCALING
int i;
for (i=0;i<count;++i) {
if (samples[i]>INT16_MAX/2) {
......@@ -78,6 +83,7 @@ static void scale_up(int16_t *samples, int count){
samples[i]=samples[i]<<1;
}
}
#endif
}
static void enc_process(MSFilter *f)
......
......@@ -2546,9 +2546,9 @@ static void player_process(MSFilter *f) {
if((!obj->players[0] || !f->outputs[0] || obj->players[0]->eot)
&& (!obj->players[1] || !f->outputs[1] || obj->players[1]->eot)) {
ms_filter_notify_no_arg(f, MS_PLAYER_EOF);
if(obj->loop_pause_interval < 0) {
ms_filter_notify_no_arg(f, MS_PLAYER_EOF);
obj->state = MSPlayerPaused;
} else {
obj->time_before_next_loop = obj->loop_pause_interval;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment