diff --git a/src/driver/audiodec/ffmpegdec.cpp b/src/driver/audiodec/ffmpegdec.cpp index a4eb905c1..c97497175 100644 --- a/src/driver/audiodec/ffmpegdec.cpp +++ b/src/driver/audiodec/ffmpegdec.cpp @@ -314,7 +314,7 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state, } if (rpacket.stream_index != best_stream) { - av_free_packet(&rpacket); + av_packet_unref(&rpacket); continue; } @@ -373,7 +373,7 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state, } if (time_played && avc->streams[best_stream]->time_base.den) *time_played = (pts - start_pts) * avc->streams[best_stream]->time_base.num / avc->streams[best_stream]->time_base.den; - av_free_packet(&rpacket); + av_packet_unref(&rpacket); } while (*state!=STOP_REQ && Status==OK); audioDecoder->StopClip(); @@ -381,7 +381,7 @@ CBaseDec::RetCode CFfmpegDec::Decoder(FILE *_in, int /*OutputFd*/, State* state, swr_free(&swr); av_free(outbuf); - av_free_packet(&rpacket); + av_packet_unref(&rpacket); av_frame_free(&frame); avcodec_close(c); //av_free(avcc); diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 64b740359..1c99b3965 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -2285,7 +2285,7 @@ void CStreamRec::run() AVPacket newpkt = pkt; if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) { - av_free_packet(&pkt); + av_packet_unref(&pkt); newpkt.buf = av_buffer_create(newpkt.data, newpkt.size, av_buffer_default_free, NULL, 0); pkt = newpkt; } @@ -2294,7 +2294,7 @@ void CStreamRec::run() pkt.dts = av_rescale_q(pkt.dts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base); av_write_frame(ofcx, &pkt); - av_free_packet(&pkt); + av_packet_unref(&pkt); if (pkt.stream_index == stream_index) { total += (double) 1000 * pkt.duration * av_q2d(ifcx->streams[stream_index]->time_base); diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index 8dd72b9e6..bf7b2ec80 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -900,7 +900,7 @@ void CStreamStream::run() AVPacket newpkt = pkt; if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) { - av_free_packet(&pkt); + av_packet_unref(&pkt); newpkt.buf = av_buffer_create(newpkt.data, newpkt.size, av_buffer_default_free, NULL, 0); pkt = newpkt; } @@ -909,7 +909,7 @@ void CStreamStream::run() pkt.dts = av_rescale_q(pkt.dts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base); av_write_frame(ofcx, &pkt); - av_free_packet(&pkt); + av_packet_unref(&pkt); } av_read_pause(ifcx); diff --git a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp index 68ea72f0d..0a0ccec47 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -441,7 +441,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: if (channel->getChannelID() == current_channel) yresult += "\n"; - yresult += string_printf("" + yresult += string_printf("" "%d. %s%s" "\n" , channel->getChannelID() @@ -473,7 +473,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: } if (event.eventID) { - yresult += string_printf("" + yresult += string_printf("" "\"Program" "\n" , channel->getChannelID() @@ -481,7 +481,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std: ); } - yresult += string_printf("" + yresult += string_printf("" "\"Stream\"" "\n" , channel->getChannelID() diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index 203ccd5d1..6878137f5 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -292,9 +292,10 @@ int CTimerManager::unlockEvents() bool CTimerManager::listEvents(CTimerEventMap &Events) { +/* events is passed as reference and thus its address is never NULL if(!&Events) return false; - + */ Events.clear(); for (CTimerEventMap::iterator pos = events.begin(); pos != events.end(); ++pos) diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index dbe38c98e..a9ab8e307 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -925,7 +925,7 @@ bool CZapit::ChangeAudioPid(uint8_t index) return false; /* stop demux filter */ - if (audioDemux->Stop() < 0) + if (audioDemux->Stop() == false) return false; /* stop audio playback */ @@ -947,11 +947,11 @@ bool CZapit::ChangeAudioPid(uint8_t index) SetAudioStreamType(currentAudioChannel->audioChannelType); /* set demux filter */ - if (audioDemux->pesFilter(current_channel->getAudioPid()) < 0) + if (audioDemux->pesFilter(current_channel->getAudioPid()) == false) return false; /* start demux filter */ - if (audioDemux->Start() < 0) + if (audioDemux->Start() == false) return false; /* start audio playback */