Fixed ATTA and DETA

Cleanup some code
Testet GRAB funktions
This commit is contained in:
jojo61
2019-10-20 14:48:28 +02:00
parent 40115f4fc6
commit f80d757704
4 changed files with 309 additions and 533 deletions

View File

@@ -1910,23 +1910,22 @@ int VideoDecodeInput(VideoStream * stream)
}
#if 0
// clearing for normal channel switch has no advantage
if (stream->ClearClose /*|| stream->ClosingStream */ ) {
if (stream->ClearClose || stream->ClosingStream ) {
int f;
// FIXME: during replay all packets are always checked
// flush buffers, if close is in the queue
for (f = 0; f < filled; ++f) {
if (stream->CodecIDRb[(stream->PacketRead + f) % VIDEO_PACKET_MAX]
== AV_CODEC_ID_NONE) {
if (f) {
Debug(3, "video: cleared upto close\n");
atomic_sub(f, &stream->PacketsFilled);
stream->PacketRead =
(stream->PacketRead + f) % VIDEO_PACKET_MAX;
stream->ClearClose = 0;
}
break;
if (stream->CodecIDRb[(stream->PacketRead + f) % VIDEO_PACKET_MAX] == AV_CODEC_ID_NONE) {
if (f) {
Debug(3, "video: cleared upto close\n");
atomic_sub(f, &stream->PacketsFilled);
stream->PacketRead =
(stream->PacketRead + f) % VIDEO_PACKET_MAX;
stream->ClearClose = 0;
}
break;
}
}
stream->ClosingStream = 0;