Here is a new version of the patch. Now it works with the sample. There was a bug in the last patch.
Jose Alberto El Lunes 27 Septiembre 2010, dplu escribió: > Thanks for the test, In fact I am not in covered area so I work with sample > given by a colleague who live in good area on our forum > > The sample is very fresh and works perfectly with xineliboutput + vdr-sxfe > with patch xineliboutputeac3_4.diff plus patch ff_audio_decoder to downmix > 5.1 to 2.0 > > Maybe is there "something" in TS who is different from your country. It > should be also interesting to have report from Italian users who > experiment this audio encoding (not all are xbmc user I hope) > > Have a nice evening > > Best regards > > Le Monday 27 September 2010 22:42:06 Jose Alberto Reguero, vous avez écrit : > > I try the sample and don't work. I look into it. But you must try live tv > > or samples made with the patches, to see if it work. I try here with a > > channel whith eac3 with spectral extention and it work well. > > > > Jose Alberto > > _______________________________________________ > vdr mailing list > vdr@linuxtv.org > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
diff -ur xine-0.9.3/vdr172remux.c xine-0.9.3.new/vdr172remux.c --- xine-0.9.3/vdr172remux.c 2009-04-12 13:52:32.000000000 +0200 +++ xine-0.9.3.new/vdr172remux.c 2010-09-29 01:58:34.798000003 +0200 @@ -1703,8 +1703,20 @@ const uchar *Payload = Data + PesPayloadOffset; const int PayloadCount = Count - PesPayloadOffset; + bool ac3; + int framesize; + unsigned short size; - if (Data[3] == 0xBD && PayloadCount >= 9 && ((Payload[0] & 0xF0) == 0x80) && Payload[4] == 0x0B && Payload[5] == 0x77 && frameSizes[Payload[8]] > 0) { + if (PayloadCount < 10) + return -1; + ac3 = ((Payload[9] >> 3) & 0x1f) <= 10; + if ( ac3) + framesize = frameSizes[Payload[8]]; + else { + size = Payload[7] + Payload[6] * 256; + framesize = ((size & 0x07FF) + 1) << 1; + } + if (Data[3] == 0xBD && ((Payload[0] & 0xF0) == 0x80) && Payload[4] == 0x0B && Payload[5] == 0x77 && framesize > 0) { if (TrackIndex) *TrackIndex = Payload[0] - 0x80; @@ -1860,6 +1872,7 @@ int done = 6 + 3 + Data[8]; int todo = Count - done; const uchar *data = Data + done; + unsigned short size; // look for 0x0B 0x77 <chk1> <chk2> <frameSize> while (todo > 0) { @@ -1906,7 +1919,12 @@ state++; continue; case get_length: - ac3todo = 2 * frameSizes[*data]; + if (((*(data + 1) >> 3) & 0x1f) <= 10) + ac3todo = 2 * frameSizes[*data]; + else { + size = chk2 + chk1 * 256; + ac3todo = ((size & 0x07FF) + 1) << 1; + } // frameSizeCode was invalid => restart searching if (ac3todo <= 0) { // reset PES header instead of using a wrong one @@ -1971,6 +1989,10 @@ int cDolbyRepacker::BreakAt(const uchar *Data, int Count) { + bool ac3; + int framesize; + unsigned short size; + if (initiallySyncing) return -1; // fill the packet buffer completely until we have synced once // enough data for test? @@ -1984,12 +2006,20 @@ if (ac3todo > 0) return headerLen + ac3todo; // enough data for test? - if (Count < headerLen + 5) + if (Count < headerLen + 6) return -1; const uchar *data = Data + headerLen; // break after ac3 frame? - if (data[0] == 0x0B && data[1] == 0x77 && frameSizes[data[4]] > 0) - return headerLen + 2 * frameSizes[data[4]]; + ac3 = ((data[5] >> 3) & 0x1f) <= 10; + if ( ac3) + framesize = 2 * frameSizes[data[4]]; + else { + size = data[3] + data[2] * 256; + framesize = ((size & 0x07FF) + 1) << 1; + } + if (data[0] == 0x0B && data[1] == 0x77 && framesize > 0) + return headerLen + framesize; + return -1; }
_______________________________________________ vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr