From patchwork Mon Sep 20 22:57:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jose Alberto Reguero X-Patchwork-Id: 12831 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.69) (envelope-from ) id 1OxpIx-0007di-7y for vdr@linuxtv.org; Tue, 21 Sep 2010 00:57:47 +0200 X-tubIT-Incoming-IP: 213.4.138.5 Received: from impaqm5.telefonica.net ([213.4.138.5]) by mail.tu-berlin.de (exim-4.69/mailfrontend-d) with esmtp for id 1OxpIw-0000pM-2b; Tue, 21 Sep 2010 00:57:47 +0200 Received: from IMPmailhost1.adm.correo ([10.20.102.38]) by IMPaqm5.telefonica.net with bizsmtp id 95rZ1f01a0piX6q3RAxlft; Tue, 21 Sep 2010 00:57:45 +0200 Received: from jar.dominio ([80.25.230.35]) by IMPmailhost1.adm.correo with BIZ IMP id 9Axk1f0030mULeg1hAxkgi; Tue, 21 Sep 2010 00:57:45 +0200 X-Brightmail-Tracker: AAAAAA== X-TE-authinfo: authemail="jareguero$telefonica.net" |auth_email="jareguero@telefonica.net" X-TE-AcuTerraCos: auth_cuTerraCos="cosuitnetc01" From: Jose Alberto Reguero To: VDR Mailing List Date: Tue, 21 Sep 2010 00:57:39 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.35; KDE/4.4.5; x86_64; ; ) References: <4BAA4EBA.4030406@free.fr> <201003251608.20823.jareguero@telefonica.net> <4C14FD8F.2070508@ventoso.org> In-Reply-To: <4C14FD8F.2070508@ventoso.org> MIME-Version: 1.0 Message-Id: <201009210057.39503.jareguero@telefonica.net> X-tubIT-Score: 0.0 () X-PMX-Version: 5.5.5.374460, Antispam-Engine: 2.7.1.369594, Antispam-Data: 2010.9.20.224814 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MIME_TEXT_ONLY_MP_MIXED 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_4000_4999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, FROM_NAME_PHRASE 0, WEBMAIL_RCVD 0, WEBMAIL_SOURCE 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_MIXED 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __USER_AGENT 0' X-LSpam-Score: -3.4 (---) X-LSpam-Report: No, score=-3.4 required=5.0 tests=AWL=0.225, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1 autolearn=ham Subject: Re: [vdr] vdr xine-lib eac3 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2010 22:57:47 -0000 Status: O X-Status: X-Keywords: X-UID: 23558 El Domingo, 13 de Junio de 2010, Luca Olivetti escribió: > Al 25/03/10 16:08, En/na Jose Alberto Reguero ha escrit: > > Patch for xine-lib that don't need to patch remux.c to work. > > Today I applied this patch (strange it isn't in xine-lib-1.2 yet) but > there's still no sound on tvehd (vdr 1.7.15, vdr-xine and playing the ts > directly through xine). > Do I need some special options to configure xine-lib for this patch to > take effect? > > Bye With this two patches vdr-xine work with eac3. I can't test if it still work with normal ac3. One patch is for the plugin, and the other is for xine-lib 1.2. Jose Alberto diff -r 9679028a161b src/demuxers/demux_mpeg_pes.c --- a/src/demuxers/demux_mpeg_pes.c Wed Jul 21 15:52:00 2010 +0000 +++ b/src/demuxers/demux_mpeg_pes.c Tue Sep 21 00:54:22 2010 +0200 @@ -103,6 +103,7 @@ uint8_t preview_data[ MAX_PREVIEW_SIZE ]; off_t preview_size, preview_done; + uint8_t preview_eac3; } demux_mpeg_pes_t ; typedef struct { @@ -931,10 +932,21 @@ buf->content = p+4; buf->size = this->packet_len-4; - if (track & 0x8) { - buf->type = BUF_AUDIO_DTS + (track & 0x07); /* DVDs only have 8 tracks */ + if (((p[9] >> 3) & 0x1f) <= 10) { + if (track & 0x8) { + buf->type = BUF_AUDIO_DTS + (track & 0x07); /* DVDs only have 8 tracks */ + } else { + buf->type = BUF_AUDIO_A52 + track; + } } else { - buf->type = BUF_AUDIO_A52 + track; + buf->type = BUF_AUDIO_EAC3; + if (this->preview_eac3 < 2) + this->preview_eac3++; + if (this->preview_eac3 == 1) + buf->decoder_flags = BUF_FLAG_HEADER | BUF_FLAG_FRAME_END; + else { + buf->decoder_flags |= BUF_FLAG_FRAME_END; + } } buf->pts = this->pts; if( !this->preview_mode ) @@ -1548,6 +1560,7 @@ */ this->last_cell_time = 0; this->send_newpts = 1; + this->preview_eac3 = 0; if( !playing ) { this->buf_flag_seek = 0;