summaryrefslogtreecommitdiffstats
path: root/gst/qtdemux
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2005-12-19 15:19:44 +0000
committerEdward Hervey <bilboed@bilboed.com>2005-12-19 15:19:44 +0000
commit95d65be727e4e64070c249641bd20d1c24070069 (patch)
treec5569e020fec5293994f882fb8abad4d02e3cb7c /gst/qtdemux
parentac8b1191d4c9db98ca500809e989f0cc75e94187 (diff)
downloadgst-plugins-bad-95d65be727e4e64070c249641bd20d1c24070069.tar.gz
gst-plugins-bad-95d65be727e4e64070c249641bd20d1c24070069.tar.bz2
gst-plugins-bad-95d65be727e4e64070c249641bd20d1c24070069.zip
ext/swfdec/gstswfdec.c: Add debugging category and return GstFlowReturn in the right places
Original commit message from CVS: * ext/swfdec/gstswfdec.c: (gst_swfdec_class_init), (gst_swfdec_chain), (gst_swfdec_render): Add debugging category and return GstFlowReturn in the right places * ext/wavpack/gstwavpackdec.c: (gst_wavpack_dec_link): Get something from the peer pad once we've checked if there is a peer pad. * gst/qtdemux/qtdemux.c: (gst_qtdemux_change_state), (qtdemux_tree_get_child_by_type), (qtdemux_parse_trak), (qtdemux_video_caps): Couple of fixes
Diffstat (limited to 'gst/qtdemux')
-rw-r--r--gst/qtdemux/qtdemux.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index 84c2facb..ce01f649 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -473,7 +473,8 @@ gst_qtdemux_change_state (GstElement * element, GstStateChange transition)
for (n = 0; n < qtdemux->n_streams; n++) {
gst_element_remove_pad (element, qtdemux->streams[n]->pad);
g_free (qtdemux->streams[n]->samples);
- gst_caps_unref (qtdemux->streams[n]->caps);
+ if (qtdemux->streams[n]->caps)
+ gst_caps_unref (qtdemux->streams[n]->caps);
g_free (qtdemux->streams[n]);
}
qtdemux->n_streams = 0;
@@ -1765,7 +1766,13 @@ qtdemux_tree_get_child_by_type (GNode * node, guint32 fourcc)
child = g_node_next_sibling (child)) {
buffer = child->data;
+ child_fourcc = GST_READ_UINT32_LE (buffer);
+ GST_LOG ("First chunk of buffer %p is [%" GST_FOURCC_FORMAT "]",
+ buffer, GST_FOURCC_ARGS (child_fourcc));
+
child_fourcc = GST_READ_UINT32_LE (buffer + 4);
+ GST_LOG ("buffer %p has fourcc [%" GST_FOURCC_FORMAT "]",
+ buffer, GST_FOURCC_ARGS (child_fourcc));
if (child_fourcc == fourcc) {
return child;
@@ -1899,7 +1906,7 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
stream = g_new0 (QtDemuxStream, 1);
tkhd = qtdemux_tree_get_child_by_type (trak, FOURCC_tkhd);
- g_assert (tkhd);
+ g_return_if_fail (tkhd);
GST_LOG ("track[tkhd] version/flags: 0x%08x",
QTDEMUX_GUINT32_GET (tkhd->data + 8));
@@ -2621,7 +2628,7 @@ qtdemux_video_caps (GstQTDemux * qtdemux, guint32 fourcc,
return gst_caps_from_string ("image/jpeg");
case GST_MAKE_FOURCC ('m', 'j', 'p', 'b'):
_codec ("Motion-JPEG format B");
- return gst_caps_from_string ("image/jpeg-b");
+ return gst_caps_from_string ("video/x-mjpeg-b");
case GST_MAKE_FOURCC ('S', 'V', 'Q', '3'):
_codec ("Sorensen video v.3");
return gst_caps_from_string ("video/x-svq, " "svqversion = (int) 3");