pipelka / vdr-plugin-xvdr

DISCONTINUED - XVDR Plugin for VDR
GNU General Public License v2.0
43 stars 22 forks source link

Wrong audio/subtitle after signal lost/restored #88

Closed n37 closed 11 years ago

n37 commented 11 years ago

This happens with channels with multiple audio/subtitle streams. After a temporary loss of signal playback resumes with the first audio/subtitle stream even though another audio/subtitle stream was previously selected.

pipelka commented 11 years ago

Ok. I can see the point but I'm not 100% sure that this is a backend related issue. I'm unable to test this because on my development system there is only a DVB-T adapter (and these channels have 1 audio stream of a kind).

Nevertheless there is one thing I changed: I disabled sending of "streamchange" messages when the signal is restored.

Please test the "n37" branch (based on master). The change is here: 2ad72ad278f2d81b1f30656f58a91cf895885997

Maybe it helps.

n37 commented 11 years ago

Am I wrong in assuming that the master-pre-vdr-1.7.34 branch is no more pre-vdr-1.7.34 because the commit "build system changes for VDR 1.7.34" has somehow appeared there as well? :)

pipelka commented 11 years ago

Oops. Seems I mixed up branches. Will fix this. Thanks

n37 commented 11 years ago

The problem is that streams are parsed in different order each time. Like this:

Jan 11 15:01:30 calico vdr: [1983] XVDR: sync found at offset 1722 (streamtype: MPEG2AUDIO / 2098 bytes in buffer / framesize: 288 bytes) Jan 11 15:01:31 calico vdr: [1983] XVDR: -------------------------------------- Jan 11 15:01:31 calico vdr: [1983] XVDR: NEW AUDIO INFORMATION: Jan 11 15:01:31 calico vdr: [1983] XVDR: Channels: 2 Jan 11 15:01:31 calico vdr: [1983] XVDR: Samplerate: 48000 Hz Jan 11 15:01:31 calico vdr: [1983] XVDR: Bitrate: 96000 bps Jan 11 15:01:31 calico vdr: [1983] XVDR: -------------------------------------- Jan 11 15:01:31 calico vdr: [1983] XVDR: Stored channel information in cache: Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: MPEG2VIDEO PID: 784 640x576 DAR: 1.78 (parsed: yes) Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: MPEG2AUDIO PID: 785 22050 Hz, 2 channels, Lang: bul (parsed: yes) Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: MPEG2AUDIO PID: 786 48000 Hz, 2 channels, Lang: srb (parsed: yes) Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: DVBSUB PID: 2947 Lang: bul (parsed: yes) Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: DVBSUB PID: 2948 Lang: srb (parsed: yes) Jan 11 15:01:31 calico vdr: [1983] XVDR-Error: Parser buffer overflow - resetting Jan 11 15:01:31 calico vdr: [1983] XVDR: sync found at offset 360 (streamtype: MPEG2AUDIO / 2208 bytes in buffer / framesize: 576 bytes) Jan 11 15:01:31 calico vdr: [1983] XVDR: -------------------------------------- Jan 11 15:01:31 calico vdr: [1983] XVDR: NEW AUDIO INFORMATION: Jan 11 15:01:31 calico vdr: [1983] XVDR: Channels: 2 Jan 11 15:01:31 calico vdr: [1983] XVDR: Samplerate: 48000 Hz Jan 11 15:01:31 calico vdr: [1983] XVDR: Bitrate: 192000 bps Jan 11 15:01:31 calico vdr: [1983] XVDR: -------------------------------------- Jan 11 15:01:31 calico vdr: [1983] XVDR: Stored channel information in cache: Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: MPEG2VIDEO PID: 784 640x576 DAR: 1.78 (parsed: yes) Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: MPEG2AUDIO PID: 785 48000 Hz, 2 channels, Lang: bul (parsed: yes) Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: MPEG2AUDIO PID: 786 48000 Hz, 2 channels, Lang: srb (parsed: yes) Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: DVBSUB PID: 2948 Lang: srb (parsed: yes) Jan 11 15:01:31 calico vdr: [1983] XVDR: Stream: DVBSUB PID: 2947 Lang: bul (parsed: yes)

In this example the subtitle streams changed their order.

pipelka commented 11 years ago

You are right. There is a stream reordering mechanism but it only prefers the audio streams of a certain type and language. I'll update the stream reorder code. I just found that the stream types in the xbmc addon do not fit to the plugin version. I'll also fix this.

pipelka commented 11 years ago

Ok. I updated the xbmc addon and the vdr plugin. Please fetch both and recheck.

n37 commented 11 years ago

Fixed. Thanks again.