summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--gst/mpegtsparse/mpegtspacketizer.c2
-rw-r--r--gst/mpegtsparse/mpegtsparse.c2
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d4d2d4d..61986c1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-10-05 Sebastian Dröge <slomo@circular-chaos.org>
+
+ Patch by: Wai-Ming Ho <webregbox at yahoo dot co dot uk>
+
+ * gst/mpegtsparse/mpegtspacketizer.c:
+ (mpegts_packetizer_stream_new):
+ Don't skip PAT with version number 0. Fixes #483400.
+ * gst/mpegtsparse/mpegtsparse.c: (mpegts_parse_apply_pat):
+ Make all values above 0 mark a referenced program as they can be
+ incremented and only 1 had marked a referenced program before, causing
+ actually referenced programs to be unreferenced.
+
2007-10-02 Wim Taymans <wim.taymans@gmail.com>
* gst/sdp/gstsdpdemux.h:
diff --git a/gst/mpegtsparse/mpegtspacketizer.c b/gst/mpegtsparse/mpegtspacketizer.c
index 025f53d9..000d0b3b 100644
--- a/gst/mpegtsparse/mpegtspacketizer.c
+++ b/gst/mpegtsparse/mpegtspacketizer.c
@@ -35,6 +35,7 @@ static void mpegts_packetizer_finalize (GObject * object);
#define CONTINUITY_UNSET 255
#define MAX_CONTINUITY 15
+#define SECTION_VERSION_NUMBER_NOTSET 255
typedef struct
{
@@ -54,6 +55,7 @@ mpegts_packetizer_stream_new (guint16 pid)
stream->section_adapter = gst_adapter_new ();
stream->pid = pid;
stream->continuity_counter = CONTINUITY_UNSET;
+ stream->section_version_number = SECTION_VERSION_NUMBER_NOTSET;
return stream;
}
diff --git a/gst/mpegtsparse/mpegtsparse.c b/gst/mpegtsparse/mpegtsparse.c
index 914bed36..994ea0b7 100644
--- a/gst/mpegtsparse/mpegtsparse.c
+++ b/gst/mpegtsparse/mpegtsparse.c
@@ -717,7 +717,7 @@ mpegts_parse_apply_pat (MpegTSParse * parse, GValueArray * pat_info)
"program-number", &program_number, "pid", &pid, NULL);
program = mpegts_parse_get_program (parse, program_number);
- if (program->patcount-- == 1)
+ if (--program->patcount > 0)
/* the program has been referenced by the new pat, keep it */
continue;