mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
driver/record.cpp, driver/streamts.cpp: ignore bitstream filter errors
This commit is contained in:
@@ -1862,6 +1862,7 @@ CStreamRec::CStreamRec(const CTimerd::RecordingInfo * const eventinfo, std::stri
|
|||||||
ofcx = NULL;
|
ofcx = NULL;
|
||||||
stopped = true;
|
stopped = true;
|
||||||
interrupt = false;
|
interrupt = false;
|
||||||
|
bsfc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CStreamRec::~CStreamRec()
|
CStreamRec::~CStreamRec()
|
||||||
@@ -2170,17 +2171,12 @@ void CStreamRec::run()
|
|||||||
if (bsfc && codec->codec_id == CODEC_ID_H264) {
|
if (bsfc && codec->codec_id == CODEC_ID_H264) {
|
||||||
AVPacket newpkt = pkt;
|
AVPacket newpkt = pkt;
|
||||||
|
|
||||||
int len;
|
if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) {
|
||||||
if ((len = 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_free_packet(&pkt);
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
av_free_packet(&pkt);
|
|
||||||
|
|
||||||
newpkt.buf = av_buffer_create(newpkt.data, newpkt.size, av_buffer_default_free, NULL, 0);
|
newpkt.buf = av_buffer_create(newpkt.data, newpkt.size, av_buffer_default_free, NULL, 0);
|
||||||
pkt = newpkt;
|
pkt = newpkt;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
pkt.pts = av_rescale_q(pkt.pts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
pkt.pts = av_rescale_q(pkt.pts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
||||||
pkt.dts = av_rescale_q(pkt.dts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
pkt.dts = av_rescale_q(pkt.dts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
||||||
|
|
||||||
|
@@ -891,17 +891,12 @@ void CStreamStream::run()
|
|||||||
if (bsfc && codec->codec_id == CODEC_ID_H264 ) {
|
if (bsfc && codec->codec_id == CODEC_ID_H264 ) {
|
||||||
AVPacket newpkt = pkt;
|
AVPacket newpkt = pkt;
|
||||||
|
|
||||||
int len;
|
if (av_bitstream_filter_filter(bsfc, codec, NULL, &newpkt.data, &newpkt.size, pkt.data, pkt.size, pkt.flags & AV_PKT_FLAG_KEY) >= 0) {
|
||||||
if ((len = 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_free_packet(&pkt);
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
av_free_packet(&pkt);
|
|
||||||
|
|
||||||
newpkt.buf = av_buffer_create(newpkt.data, newpkt.size, av_buffer_default_free, NULL, 0);
|
newpkt.buf = av_buffer_create(newpkt.data, newpkt.size, av_buffer_default_free, NULL, 0);
|
||||||
pkt = newpkt;
|
pkt = newpkt;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
pkt.pts = av_rescale_q(pkt.pts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
pkt.pts = av_rescale_q(pkt.pts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
||||||
pkt.dts = av_rescale_q(pkt.dts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
pkt.dts = av_rescale_q(pkt.dts, ifcx->streams[pkt.stream_index]->time_base, ofcx->streams[pkt.stream_index]->time_base);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user