mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Reduce PES error messages.
This commit is contained in:
parent
738e9402d2
commit
cc1e2de58b
@ -1,6 +1,7 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
Date:
|
||||||
|
|
||||||
|
Reduce PES error messages.
|
||||||
Fix bug #1392: Wrong value for mixing LFE.
|
Fix bug #1392: Wrong value for mixing LFE.
|
||||||
Fix bug: wrong grab size, introduced with AMD VDPAU.
|
Fix bug: wrong grab size, introduced with AMD VDPAU.
|
||||||
Use VDR SPU decoder as default.
|
Use VDR SPU decoder as default.
|
||||||
|
15
softhddev.c
15
softhddev.c
@ -1316,6 +1316,8 @@ struct __video_stream__
|
|||||||
volatile char ClearBuffers; ///< command clear video buffers
|
volatile char ClearBuffers; ///< command clear video buffers
|
||||||
volatile char ClearClose; ///< clear video buffers for close
|
volatile char ClearClose; ///< clear video buffers for close
|
||||||
|
|
||||||
|
int InvalidPesCounter; ///< counter of invalid PES packets
|
||||||
|
|
||||||
AVPacket PacketRb[VIDEO_PACKET_MAX]; ///< PES packet ring buffer
|
AVPacket PacketRb[VIDEO_PACKET_MAX]; ///< PES packet ring buffer
|
||||||
int StartCodeState; ///< last three bytes start code state
|
int StartCodeState; ///< last three bytes start code state
|
||||||
|
|
||||||
@ -1756,6 +1758,7 @@ static void VideoStreamClose(VideoStream * stream)
|
|||||||
VideoPacketExit(stream);
|
VideoPacketExit(stream);
|
||||||
|
|
||||||
stream->NewStream = 1;
|
stream->NewStream = 1;
|
||||||
|
stream->InvalidPesCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2012,6 +2015,7 @@ static void StopVideo(void)
|
|||||||
VideoPacketExit(MyVideoStream);
|
VideoPacketExit(MyVideoStream);
|
||||||
|
|
||||||
MyVideoStream->NewStream = 1;
|
MyVideoStream->NewStream = 1;
|
||||||
|
MyVideoStream->InvalidPesCounter = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -2141,9 +2145,18 @@ int PlayVideo3(VideoStream * stream, const uint8_t * data, int size)
|
|||||||
// must be a PES start code
|
// must be a PES start code
|
||||||
// FIXME: Valgrind-3.8.1 has a problem with this code
|
// FIXME: Valgrind-3.8.1 has a problem with this code
|
||||||
if (size < 9 || !data || data[0] || data[1] || data[2] != 0x01) {
|
if (size < 9 || !data || data[0] || data[1] || data[2] != 0x01) {
|
||||||
|
if (!stream->InvalidPesCounter++) {
|
||||||
Error(_("[softhddev] invalid PES video packet\n"));
|
Error(_("[softhddev] invalid PES video packet\n"));
|
||||||
|
}
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
if (stream->InvalidPesCounter) {
|
||||||
|
if (stream->InvalidPesCounter > 1) {
|
||||||
|
Error(_("[softhddev] %d invalid PES video packet(s)\n"),
|
||||||
|
stream->InvalidPesCounter);
|
||||||
|
}
|
||||||
|
stream->InvalidPesCounter = 0;
|
||||||
|
}
|
||||||
// 0xBE, filler, padding stream
|
// 0xBE, filler, padding stream
|
||||||
if (data[3] == PES_PADDING_STREAM) { // from DVD plugin
|
if (data[3] == PES_PADDING_STREAM) { // from DVD plugin
|
||||||
return size;
|
return size;
|
||||||
@ -2410,6 +2423,7 @@ int SetPlayMode(int play_mode)
|
|||||||
}
|
}
|
||||||
if (MyVideoStream->CodecID != CODEC_ID_NONE) {
|
if (MyVideoStream->CodecID != CODEC_ID_NONE) {
|
||||||
MyVideoStream->NewStream = 1;
|
MyVideoStream->NewStream = 1;
|
||||||
|
MyVideoStream->InvalidPesCounter = 0;
|
||||||
// tell hw decoder we are closing stream
|
// tell hw decoder we are closing stream
|
||||||
VideoSetClosing(MyVideoStream->HwDecoder);
|
VideoSetClosing(MyVideoStream->HwDecoder);
|
||||||
VideoResetStart(MyVideoStream->HwDecoder);
|
VideoResetStart(MyVideoStream->HwDecoder);
|
||||||
@ -3426,6 +3440,7 @@ void PipStop(void)
|
|||||||
VideoPacketExit(PipVideoStream);
|
VideoPacketExit(PipVideoStream);
|
||||||
|
|
||||||
PipVideoStream->NewStream = 1;
|
PipVideoStream->NewStream = 1;
|
||||||
|
PipVideoStream->InvalidPesCounter = 0;
|
||||||
#else
|
#else
|
||||||
PipVideoStream->Close = 1;
|
PipVideoStream->Close = 1;
|
||||||
for (i = 0; PipVideoStream->Close && i < 50; ++i) {
|
for (i = 0; PipVideoStream->Close && i < 50; ++i) {
|
||||||
|
@ -1443,12 +1443,12 @@ static void PipPesParse(const uint8_t * data, int size, int is_start)
|
|||||||
if (is_start) { // start of pes packet
|
if (is_start) { // start of pes packet
|
||||||
if (pes_index) {
|
if (pes_index) {
|
||||||
if (0) {
|
if (0) {
|
||||||
fprintf(stderr, "pip: pes packet %8d %02x%02x\n", pes_index,
|
fprintf(stderr, "pip: PES packet %8d %02x%02x\n", pes_index,
|
||||||
pes_buf[2], pes_buf[3]);
|
pes_buf[2], pes_buf[3]);
|
||||||
}
|
}
|
||||||
if (pes_buf[0] || pes_buf[1] || pes_buf[2] != 0x01) {
|
if (pes_buf[0] || pes_buf[1] || pes_buf[2] != 0x01) {
|
||||||
// FIXME: first should always fail
|
// FIXME: first should always fail
|
||||||
esyslog(tr("[softhddev]pip: invalid pes packet %d\n"),
|
esyslog(tr("[softhddev]pip: invalid PES packet %d\n"),
|
||||||
pes_index);
|
pes_index);
|
||||||
} else {
|
} else {
|
||||||
PipPlayVideo(pes_buf, pes_index);
|
PipPlayVideo(pes_buf, pes_index);
|
||||||
|
Loading…
Reference in New Issue
Block a user