From 4d1a516c808202141af4268199ae09e9c4bec3fc Mon Sep 17 00:00:00 2001 From: Johns Date: Fri, 2 Mar 2012 16:06:45 +0100 Subject: [PATCH] Fix Bug: PES audio buffer not correct reset. --- softhddev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/softhddev.c b/softhddev.c index ee22552..d875417 100644 --- a/softhddev.c +++ b/softhddev.c @@ -444,6 +444,7 @@ void PesInit(PesDemux * pesdx) void PesReset(PesDemux * pesdx) { pesdx->State = PES_INIT; + pesdx->Index = 0; pesdx->Skip = 0; pesdx->PTS = AV_NOPTS_VALUE; pesdx->DTS = AV_NOPTS_VALUE; @@ -548,6 +549,8 @@ void PesParse(PesDemux * pesdx, const uint8_t * data, int size, int is_start) // new codec id, close and open new if (AudioCodecID != codec_id) { + Debug(3, "pesdemux: new codec %#06x -> %#06x\n", + AudioCodecID, codec_id); CodecAudioClose(MyAudioDecoder); CodecAudioOpen(MyAudioDecoder, NULL, codec_id); AudioCodecID = codec_id;