From: Arnaud Vrac <avrac@freebox.fr>
Date: Wed, 29 Aug 2012 17:31:19 +0200
Subject: mpegdemux: do not strip number of audio frames in packet


diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -2093,8 +2093,6 @@ gst_flups_demux_data_cb (GstPESFilter * filter, gboolean first,
     if (stream_type == -1) {
       /* no stream type, if PS1, get the new id */
       if (start_code == ID_PRIVATE_STREAM_1 && datalen >= 2) {
-        guint8 nframes;
-
         /* VDR writes A52 streams without any header bytes
          * (see ftp://ftp.mplayerhq.hu/MPlayer/samples/MPEG-VOB/vdr-AC3) */
         if (datalen >= 4) {
@@ -2115,19 +2113,8 @@ gst_flups_demux_data_cb (GstPESFilter * filter, gboolean first,
           /* and remap */
           stream_type = demux->psm[id];
 
-          /* Now, if it's a subpicture stream - no more, otherwise
-           * take the first byte too, since it's the frame count in audio
-           * streams and our backwards compat convention is to strip it off */
-          if (stream_type != ST_PS_DVD_SUBPICTURE) {
-            /* Number of audio frames in this packet */
-            nframes = map.data[offset++];
-            datalen--;
-            GST_DEBUG_OBJECT (demux, "private type 0x%02x, %d frames", id,
-                nframes);
-          } else {
-            GST_DEBUG_OBJECT (demux, "private type 0x%02x, stream type %d", id,
-                stream_type);
-          }
+          GST_DEBUG_OBJECT (demux, "private type 0x%02x, stream type %d", id,
+              stream_type);
         }
       }
       if (stream_type == -1)
