[mythtv] [patch] firewire mpeg2ts sync bugfix
Jim Westfall
jwestfall at surrealistic.net
Wed May 4 01:26:56 UTC 2005
patch will ignore any mpeg2ts packet that doesnt have a valid sync byte.
should fix an issue reported on the users mailing list about the first
couple packets on a new recording being all zeros.
jim
-------------- next part --------------
Index: libs/libmythtv/firewirerecorder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/firewirerecorder.cpp,v
retrieving revision 1.3
diff -u -r1.3 firewirerecorder.cpp
--- libs/libmythtv/firewirerecorder.cpp 11 Mar 2005 19:18:51 -0000 1.3
+++ libs/libmythtv/firewirerecorder.cpp 4 May 2005 01:14:44 -0000
@@ -23,7 +23,12 @@
if(dropped) {
VERBOSE(VB_GENERAL,QString("Firewire: %1 packet(s) dropped.").arg(dropped));
}
- fw->ProcessTSPacket(tspacket,len);
+
+ if(tspacket[0] == SYNC_BYTE) {
+ fw->ProcessTSPacket(tspacket,len);
+ } else {
+ VERBOSE(VB_GENERAL,QString("Firewire: out of sync mpeg2ts packet"));
+ }
return 1;
}
More information about the mythtv-dev
mailing list