summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormutex at runbox dot com <mutex@runbox.com>2007-10-01 09:21:19 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2007-10-01 09:21:19 +0000
commit0813fdac806a7f380a48af885a8296bb14d6b81c (patch)
tree16db0c1c7939a86ff614c1a854face511c87cf97
parentc553adff7a7e90231fb4e74cced3b895f60e04e7 (diff)
downloadgst-plugins-bad-0813fdac806a7f380a48af885a8296bb14d6b81c.tar.gz
gst-plugins-bad-0813fdac806a7f380a48af885a8296bb14d6b81c.tar.bz2
gst-plugins-bad-0813fdac806a7f380a48af885a8296bb14d6b81c.zip
gst/mpegtsparse/: Remove useless src pad that only results in not linked errors, fix a broken pointer dereference and...
Original commit message from CVS: Patch by: mutex at runbox dot com * gst/mpegtsparse/mpegtspacketizer.c: (mpegts_packetizer_parse_adaptation_field_control): * gst/mpegtsparse/mpegtsparse.c: (mpegts_parse_base_init), (mpegts_parse_init), (mpegts_parse_push): * gst/mpegtsparse/mpegtsparse.h: Remove useless src pad that only results in not linked errors, fix a broken pointer dereference and make MAX_CONTINUITY constant conform to the standard to stop outputting corrupted data. Fixes #481276, #481279.
-rw-r--r--ChangeLog14
-rw-r--r--gst/mpegtsparse/mpegtspacketizer.c4
-rw-r--r--gst/mpegtsparse/mpegtsparse.c17
-rw-r--r--gst/mpegtsparse/mpegtsparse.h1
4 files changed, 17 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 22bfc3dc..9c04ef60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2007-10-01 Sebastian Dröge <slomo@circular-chaos.org>
+
+ Patch by: mutex at runbox dot com
+
+ * gst/mpegtsparse/mpegtspacketizer.c:
+ (mpegts_packetizer_parse_adaptation_field_control):
+ * gst/mpegtsparse/mpegtsparse.c: (mpegts_parse_base_init),
+ (mpegts_parse_init), (mpegts_parse_push):
+ * gst/mpegtsparse/mpegtsparse.h:
+ Remove useless src pad that only results in not linked errors,
+ fix a broken pointer dereference and make MAX_CONTINUITY constant
+ conform to the standard to stop outputting corrupted data.
+ Fixes #481276, #481279.
+
2007-09-29 Tim-Philipp Müller <tim at centricular dot net>
* ext/mythtv/gstmythtvsrc.c:
diff --git a/gst/mpegtsparse/mpegtspacketizer.c b/gst/mpegtsparse/mpegtspacketizer.c
index 1530c10d..025f53d9 100644
--- a/gst/mpegtsparse/mpegtspacketizer.c
+++ b/gst/mpegtsparse/mpegtspacketizer.c
@@ -34,7 +34,7 @@ static void mpegts_packetizer_dispose (GObject * object);
static void mpegts_packetizer_finalize (GObject * object);
#define CONTINUITY_UNSET 255
-#define MAX_CONTINUITY 16
+#define MAX_CONTINUITY 15
typedef struct
{
@@ -154,7 +154,7 @@ mpegts_packetizer_parse_adaptation_field_control (MpegTSPacketizer * packetizer,
packet->pid, length);
return FALSE;
}
- *packet->data += length;
+ packet->data += length;
return TRUE;
}
diff --git a/gst/mpegtsparse/mpegtsparse.c b/gst/mpegtsparse/mpegtsparse.c
index 0d0a4232..914bed36 100644
--- a/gst/mpegtsparse/mpegtsparse.c
+++ b/gst/mpegtsparse/mpegtsparse.c
@@ -83,12 +83,6 @@ static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_CAPS ("video/mpegts, " "systemstream = (boolean) true ")
);
-static GstStaticPadTemplate src_template =
-GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS ("video/mpegts, " "systemstream = (boolean) true ")
- );
-
static GstStaticPadTemplate program_template =
GST_STATIC_PAD_TEMPLATE ("program_%d", GST_PAD_SRC,
GST_PAD_SOMETIMES,
@@ -146,8 +140,6 @@ mpegts_parse_base_init (gpointer klass)
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&sink_template));
gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&src_template));
- gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&program_template));
gst_element_class_set_details (element_class, &mpegts_parse_details);
@@ -218,9 +210,6 @@ mpegts_parse_init (MpegTSParse * parse, MpegTSParseClass * klass)
gst_pad_set_event_function (parse->sinkpad, mpegts_parse_sink_event);
gst_element_add_pad (GST_ELEMENT (parse), parse->sinkpad);
- parse->srcpad = mpegts_parse_create_tspad (parse, "src")->pad;
- gst_element_add_pad (GST_ELEMENT (parse), parse->srcpad);
-
parse->disposed = FALSE;
parse->packetizer = mpegts_packetizer_new ();
parse->program_numbers = g_strdup ("");
@@ -597,14 +586,10 @@ mpegts_parse_push (MpegTSParse * parse, MpegTSPacketizerPacket * packet)
MpegTSParsePad *tspad;
guint16 pid;
GstBuffer *buffer;
- GstFlowReturn ret = GST_FLOW_NOT_LINKED;
- GstCaps *caps;
+ GstFlowReturn ret = GST_FLOW_OK;
pid = packet->pid;
- caps = gst_pad_get_caps (parse->srcpad);
buffer = packet->buffer;
- gst_buffer_set_caps (buffer, caps);
- gst_caps_unref (caps);
GST_OBJECT_LOCK (parse);
/* clear tspad->pushed on pads */
diff --git a/gst/mpegtsparse/mpegtsparse.h b/gst/mpegtsparse/mpegtsparse.h
index cace953a..e4a9df72 100644
--- a/gst/mpegtsparse/mpegtsparse.h
+++ b/gst/mpegtsparse/mpegtsparse.h
@@ -48,7 +48,6 @@ struct _MpegTSParse {
GstElement element;
GstPad *sinkpad;
- GstPad *srcpad;
/* the following vars must be protected with the OBJECT_LOCK as they can be
* accessed from the application thread and the streaming thread */