Skip to content

Commit

Permalink
AE: do not mute raw packets
Browse files Browse the repository at this point in the history
  • Loading branch information
FernetMenta committed Jan 21, 2016
1 parent 07bf4ac commit d6f9483
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2268,9 +2268,17 @@ CSampleBuffer* CActiveAE::SyncStream(CActiveAEStream *stream)
if (stream->m_syncClock == CActiveAEStream::MUTE)
{
CSampleBuffer *buf = stream->m_resampleBuffers->m_outputSamples.front();
for(int i=0; i<buf->pkt->planes; i++)
if (m_mode == MODE_RAW)
{
ret->pkt->nb_samples = 0;

This comment has been minimized.

Copy link
@popcornmix

popcornmix Jan 22, 2016

seg faults for me with ret=null. Should that be buf->pkt?

This comment has been minimized.

Copy link
@FernetMenta

FernetMenta Jan 22, 2016

Author Owner

oops, I will correct it

This comment has been minimized.

Copy link
@popcornmix

popcornmix Jan 22, 2016

Even with fix, I think there is still a problem with pausing. Both before and after this commit when paused my Yamaha receiver flashes the DTS light. I also get that for a second when seeking. I suspect this indicates invalid data being sent and a more fussy receiver may produce noise or lose signal completely.

Actually - I just hit that - when paused Yamaha switched to PCM and produced loud noise. Doesn't do it every time.

For comparison with omxplayer when paused the DTS light on the receiver doesn't flicker. omxplayer outputs pause burst frames when paused.

This comment has been minimized.

Copy link
@FernetMenta

FernetMenta Jan 22, 2016

Author Owner

maybe there's something wrong with the pause burst:

uint16_t* buf = (uint16_t*)m_packer->GetBuffer();

This comment has been minimized.

Copy link
@popcornmix

popcornmix Jan 22, 2016

In the linked code, doesn't PackAC3 dereference payload[5] which doesn't exist?

This comment has been minimized.

Copy link
@FernetMenta

FernetMenta Jan 22, 2016

Author Owner

right. do you see anything else that is wrong?

ret->pkt->pause_burst_ms = stream->m_resampleBuffers->m_format.m_streamInfo.GetDuration();
}
else
{
memset(buf->pkt->data[i], 0, buf->pkt->linesize);
for(int i=0; i<buf->pkt->planes; i++)
{
memset(buf->pkt->data[i], 0, buf->pkt->linesize);
}
}
}
else if (stream->m_syncClock == CActiveAEStream::ADJUST)
Expand Down

0 comments on commit d6f9483

Please sign in to comment.