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 042cf1ad4..ec33188dd 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -2207,7 +2207,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; } @@ -2216,7 +2216,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 f293f0e7e..e60f4b88c 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 fbc620122..ce7537673 100644 --- a/src/nhttpd/tuxboxapi/neutrinoyparser.cpp +++ b/src/nhttpd/tuxboxapi/neutrinoyparser.cpp @@ -429,7 +429,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() @@ -461,7 +461,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() @@ -469,7 +469,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 cfb509c8e..6e17a1c01 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 432e19e00..375c1f228 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -926,7 +926,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 */ @@ -948,11 +948,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 */