Collecting patches for vdr-xine-0.9.4

Message ID 201101180033.34966.jareguero@telefonica.net
State New
Headers

Commit Message

Jose Alberto Reguero Jan. 17, 2011, 11:33 p.m. UTC
  On Lunes, 17 de Enero de 2011 21:37:06 Reinhard Nissl escribió:
> Hi,
> 
> it looks like I can find more time this week to work on vdr-xine.
> 
> I've seen some patches for vdr-xine-0.9.3 (and xine-lib) in the
> mailing list which address so far unsupported audio formats if I
> recall correctly, as vdr-xine still uses PES and my c*Repackers.
> 
> I'd like to invite you to send them again to me (privately). A
> sample recording would be appreciated too.
> 
> Bye.

Attached are two patches to play dolby digital plus audio with vdr-xine. One 
for vdr-xine and another for xine-lib. There is an aditional patch to play 
dolby digital plus audio with xine-lib and a ts file.

Jose Alberto
  

Patch

diff -r 03d01d484189 src/demuxers/demux_ts.c
--- a/src/demuxers/demux_ts.c	Thu Sep 23 18:19:29 2010 +0100
+++ b/src/demuxers/demux_ts.c	Sun Oct 03 23:47:39 2010 +0200
@@ -847,7 +847,6 @@ 
       m->type      = BUF_SPU_DVD + spu_id;
       return 1;
     } else if ((p[0] & 0xF0) == 0x80) {
-
       m->content   = p+4;
       m->size      = packet_len - 4;
       m->type      |= BUF_AUDIO_A52;
@@ -969,13 +968,16 @@ 
         m->buf->decoder_info[2] = SPU_DVD_SUBTYPE_PACKAGE;
       }
       else {
-        if (this->numPreview<5)
-	  ++this->numPreview;
-	if ( this->numPreview==1 )
-	  m->buf->decoder_flags=BUF_FLAG_HEADER | BUF_FLAG_FRAME_END;
-	else if ( this->numPreview<5 )
-	  m->buf->decoder_flags=BUF_FLAG_PREVIEW;
-	else
+        if ( (m->buf->type & BUF_AUDIO_BASE) == BUF_AUDIO_BASE) {
+          if (this->numPreview<5)
+	    ++this->numPreview;
+ 	  if ( this->numPreview==1 )
+	    m->buf->decoder_flags=BUF_FLAG_HEADER | BUF_FLAG_FRAME_END;
+	  else if ( this->numPreview<5 )
+	    m->buf->decoder_flags=BUF_FLAG_PREVIEW;
+	  else
+	    m->buf->decoder_flags |= BUF_FLAG_FRAME_END;
+        } else
 	  m->buf->decoder_flags |= BUF_FLAG_FRAME_END;
       }
       m->buf->pts = m->pts;
@@ -1033,7 +1035,19 @@ 
         m->buf->extra_info->input_time = (int)((int64_t)this->input->get_current_pos (this->input)
                                          * 1000 / (this->rate * 50));
 
-      m->fifo->put(m->fifo, m->buf);
+      if (this->numPreview > 0) {
+        if ( (m->buf->type & BUF_AUDIO_BASE) == BUF_AUDIO_BASE) {
+          if (this->numPreview<5)
+	    ++this->numPreview;
+ 	  if ( this->numPreview==1 )
+	    m->buf->decoder_flags=BUF_FLAG_HEADER | BUF_FLAG_FRAME_END;
+	  else if ( this->numPreview<5 )
+	    m->buf->decoder_flags=BUF_FLAG_PREVIEW;
+	}
+        m->fifo->put(m->fifo, m->buf);
+      } else {
+        m->buf->free_buffer(m->buf);
+      }
       m->buffered_bytes = 0;
       m->buf = m->fifo->buffer_pool_alloc(m->fifo);