Terry Barnaby wrote:
Eureka !

I think I have tracked down the problem with the XvMC VLD breaking on
channel changes with TS streams.


Enclosed is an updated patch that fixes the problem of both standard XvMC and XvMC VLD breaking on channel changes with TS streams.

Note: This only handles XvMC and XvMC VLD Codecs. Other Codecs
that have problems with channel changes with TS streams will
now exit with an error message.

Terry
Index: libs/libavcodec/parser.c
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libavcodec/parser.c,v
retrieving revision 1.10
diff -u -r1.10 parser.c
--- libs/libavcodec/parser.c	1 Feb 2005 05:09:30 -0000	1.10
+++ libs/libavcodec/parser.c	1 May 2005 07:50:35 -0000
@@ -811,7 +811,14 @@
 #endif
 
 AVCodecParser mpegvideo_parser = {
-    { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO },
+    { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO,
+#ifdef USING_XVMC_VLD
+        CODEC_ID_MPEG2VIDEO_XVMC_VLD,
+#endif
+#ifdef USING_XVMC
+        CODEC_ID_MPEG2VIDEO_XVMC,
+#endif
+    },
     sizeof(ParseContext1),
     NULL,
     mpegvideo_parse,
@@ -843,3 +850,4 @@
     NULL,
 };
 #endif
+
Index: libs/libavformat/utils.c
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libavformat/utils.c,v
retrieving revision 1.32
diff -u -r1.32 utils.c
--- libs/libavformat/utils.c	31 Jan 2005 17:15:16 -0000	1.32
+++ libs/libavformat/utils.c	1 May 2005 07:50:38 -0000
@@ -900,6 +900,8 @@
                     if (!st->parser) {
                         /* no parser available : just output the raw packets */
                         st->need_parsing = 0;
+			av_log(s, AV_LOG_ERROR, "Parser not found for Codec Id: %d !\n", st->codec.codec_id);
+			exit(1);
                     }
 		}
 	    }
Index: libs/libmythtv/siparser.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/siparser.cpp,v
retrieving revision 1.16
diff -u -r1.16 siparser.cpp
--- libs/libmythtv/siparser.cpp	15 Apr 2005 00:46:08 -0000	1.16
+++ libs/libmythtv/siparser.cpp	1 May 2005 07:50:42 -0000
@@ -657,6 +657,7 @@
 
     if (Table[PMT]->AddSection(head,head->table_id_ext,0))
         return;
+    int Video_taken=0;
 
     SIPARSER(QString("PMT ServiceID: %1 Version = %2").arg(head->table_id_ext).arg(head->version));
 
@@ -724,6 +725,17 @@
             case 0x04:
                 e.Type = ES_TYPE_AUDIO_MPEG2;
                 break;
+            case 0x06:
+                if (!Video_taken)
+                {
+                    e.Type = ES_TYPE_VIDEO_MPEG2;
+                    Video_taken=1;
+                }
+                else
+                {
+                    e.Type = ES_TYPE_AUDIO_MPEG2;
+                }
+                break;
             case 0x08:
             case 0x0B:
                 e.Type = ES_TYPE_DATA;
@@ -781,6 +793,7 @@
 
                     case 0x59: // Subtitling Descriptor
                         ParseDescriptorSubtitling(descriptor, descriptor_len);
+                        if (e.Type == ES_TYPE_VIDEO_MPEG1) Video_taken=0; 
                         e.Type = ES_TYPE_SUBTITLE;
                         break;
 
@@ -806,6 +819,7 @@
                 break;
             case ES_TYPE_VIDEO_MPEG2:
                 e.Description = QString("MPEG-2 Video");
+                if (e.Orig_Type == 0x06) p.PCRPID = e.PID;
                 p.hasVideo = true;
                 break;
             case ES_TYPE_AUDIO_MPEG1:
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to