diff --git a/src/driver/audiodec/ffmpegdec.cpp b/src/driver/audiodec/ffmpegdec.cpp index 7f0bb32fb..63713e7cf 100644 --- a/src/driver/audiodec/ffmpegdec.cpp +++ b/src/driver/audiodec/ffmpegdec.cpp @@ -247,16 +247,20 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state, AVFrame *frame = NULL; AVPacket rpacket; av_init_packet(&rpacket); + c->channel_layout = c->channel_layout ? c->channel_layout : AV_CH_LAYOUT_STEREO; av_opt_set_int(swr, "in_channel_layout", c->channel_layout, 0); //av_opt_set_int(swr, "out_channel_layout", c->channel_layout, 0); av_opt_set_int(swr, "out_channel_layout", AV_CH_LAYOUT_STEREO, 0); av_opt_set_int(swr, "in_sample_rate", c->sample_rate, 0); av_opt_set_int(swr, "out_sample_rate", c->sample_rate, 0); - av_opt_set_int(swr, "in_sample_fmt", c->sample_fmt, 0); - av_opt_set_int(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); + av_opt_set_sample_fmt(swr, "in_sample_fmt", c->sample_fmt, 0); + av_opt_set_sample_fmt(swr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0); - swr_init(swr); + if (( swr_init(swr)) < 0) { + Status=DATA_ERR; + return Status; + } uint8_t *outbuf = NULL; int outsamples = 0; diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 423d5c4f6..02353ef3f 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1266,7 +1266,7 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 firstKey = false; CTimerManager::getInstance()->cancelShutdownOnWakeup(); } - uint32_t trkey = translate(ev.code, i); + uint32_t trkey = translate(ev.code); #ifdef _DEBUG printf("key: %04x value %d, translate: %04x -%s-\n", ev.code, ev.value, trkey, getKeyName(trkey).c_str()); #endif @@ -1627,7 +1627,7 @@ const char *CRCInput::getKeyNameC(const unsigned int key) * transforms the rc-key to generic - internal use only! * **************************************************************************/ -int CRCInput::translate(int code, int /*num*/) +int CRCInput::translate(int code) { switch(code) { @@ -1650,8 +1650,8 @@ int CRCInput::translate(int code, int /*num*/) } if ((code >= 0) && (code <= KEY_MAX)) return code; - else - return ( unsigned int)RC_nokey; + + return (int)RC_nokey; } void CRCInput::close_click() diff --git a/src/driver/rcinput.h b/src/driver/rcinput.h index f172b00d7..b2015351f 100644 --- a/src/driver/rcinput.h +++ b/src/driver/rcinput.h @@ -161,7 +161,7 @@ class CRCInput void open(int dev = -1); void close(); - int translate(int code, int num); + int translate(int code); void calculateMaxFd(void); int checkTimers(); #ifdef IOC_IR_SET_PRI_PROTOCOL diff --git a/src/gui/components/cc_item_picture.cpp b/src/gui/components/cc_item_picture.cpp index 94f7af613..bc8f67472 100644 --- a/src/gui/components/cc_item_picture.cpp +++ b/src/gui/components/cc_item_picture.cpp @@ -153,7 +153,7 @@ void CComponentsPicture::initCCItem() void CComponentsPicture::initPosition() { //using of real x/y values to paint images if this picture object is bound in a parent form - int px = x, py = y; + int px = pic_x = x, py = pic_y = y; if (cc_parent){ px = cc_xr; py = cc_yr; diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index bc921b764..788016e1f 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -84,7 +84,7 @@ void wakeup_hdd(const char *hdd_dir) if(!check_dir(hdd_dir) && hdd_get_standby(hdd_dir)){ std::string wakeup_file = hdd_dir; wakeup_file += "/.wakeup"; - int fd = open(wakeup_file.c_str(), O_SYNC | O_WRONLY | O_CREAT | O_TRUNC); + int fd = open(wakeup_file.c_str(), O_SYNC | O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR); if (fd >= 0) { unsigned char buf[512]; memset(buf, 0xFF, sizeof(buf));