summaryrefslogtreecommitdiff
path: root/gst/jpegformat
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2010-11-21 15:09:17 +0100
committerStefan Kost <ensonic@users.sf.net>2011-04-11 10:37:49 +0300
commit51e57d439e80e8b8e3cad98c9609df7817fa55ce (patch)
tree7979364d30d74d2b679a38f704a92583484453e4 /gst/jpegformat
parent17fd7ebcb4ea6fe3fd6b8a6f88774f28302fc8e8 (diff)
downloadgstreamer-plugins-bad-51e57d439e80e8b8e3cad98c9609df7817fa55ce.tar.gz
jpegparse: add get_tag_list ()
https://bugzilla.gnome.org/show_bug.cgi?id=626618
Diffstat (limited to 'gst/jpegformat')
-rw-r--r--gst/jpegformat/gstjpegparse.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gst/jpegformat/gstjpegparse.c b/gst/jpegformat/gstjpegparse.c
index ca9ac1f2f..cee404022 100644
--- a/gst/jpegformat/gstjpegparse.c
+++ b/gst/jpegformat/gstjpegparse.c
@@ -528,6 +528,14 @@ gst_jpeg_parse_skip_marker (GstJpegParse * parse,
return TRUE;
}
+static inline GstTagList *
+get_tag_list (GstJpegParse * parse)
+{
+ if (!parse->priv->tags)
+ parse->priv->tags = gst_tag_list_new ();
+ return parse->priv->tags;
+}
+
static gboolean
gst_jpeg_parse_read_header (GstJpegParse * parse, GstBuffer * buffer)
{
@@ -941,9 +949,8 @@ gst_jpeg_parse_sink_event (GstPad * pad, GstEvent * event)
gst_event_parse_tag (event, &taglist);
/* Hold on to the tags till the srcpad caps are definitely set */
- if (!parse->priv->tags)
- parse->priv->tags = gst_tag_list_new ();
- gst_tag_list_insert (parse->priv->tags, taglist, GST_TAG_MERGE_REPLACE);
+ gst_tag_list_insert (get_tag_list (parse), taglist,
+ GST_TAG_MERGE_REPLACE);
gst_event_unref (event);
}
break;