summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-08-10 16:52:40 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2005-08-10 16:52:40 +0000
commit1671b7d73a6e2791729f83e3af3ef4e3dfca020f (patch)
tree91b06455d6373c7c3327ec0b241f9beeafc22f30
parent79fff8eb08bc19108098c982b54af014a7e5a133 (diff)
downloadgstreamer-plugins-bad-1671b7d73a6e2791729f83e3af3ef4e3dfca020f.tar.gz
ext/gdk_pixbuf/gstgdkpixbuf.c: Support various image formats (e.g. RGBA). Makes gif images work.
Original commit message from CVS: * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_chain): Support various image formats (e.g. RGBA). Makes gif images work. * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header), (gst_qtdemux_add_stream), (qtdemux_parse_trak): Some workarounds for odd behaviour I found while crawling through apple.com/trailers. For one, if you load single-image (still-image) trailers containing gif images, they will have an infinite framerate since there is no duration. Capping framerate makes negotiation work. Also, some movies don't actually have size markers, since they only contain a single chunk of data (or so? I don't understand quicktime at all, I guess), so throwing the whole binary blob from the offset to end-of-file to the decoder makes at least something display (yes, this actually works :) ). Lastly, for some reason, one redirect URI movies caused an assertion because it read a negative size (immediate return) and tried to flush it (guint, signflip), leading to odd stuff and subsequent crashes.
-rw-r--r--ChangeLog19
-rw-r--r--gst/qtdemux/qtdemux.c13
2 files changed, 29 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f8ef94956..5a6c1a6f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,24 @@
2005-08-10 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_chain):
+ Support various image formats (e.g. RGBA). Makes gif images work.
+ * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header),
+ (gst_qtdemux_add_stream), (qtdemux_parse_trak):
+ Some workarounds for odd behaviour I found while crawling through
+ apple.com/trailers. For one, if you load single-image (still-image)
+ trailers containing gif images, they will have an infinite framerate
+ since there is no duration. Capping framerate makes negotiation work.
+ Also, some movies don't actually have size markers, since they only
+ contain a single chunk of data (or so? I don't understand quicktime
+ at all, I guess), so throwing the whole binary blob from the offset
+ to end-of-file to the decoder makes at least something display (yes,
+ this actually works :) ). Lastly, for some reason, one redirect URI
+ movies caused an assertion because it read a negative size (immediate
+ return) and tried to flush it (guint, signflip), leading to odd
+ stuff and subsequent crashes.
+
+2005-08-10 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_get):
Fix premature EOS. This causes issues when reading ID3v1 tags using
gnomevfssrc instead of filesrc; after ID3v1 tag typefinding, the
diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c
index c92c2a9b2..be75424f0 100644
--- a/gst/qtdemux/qtdemux.c
+++ b/gst/qtdemux/qtdemux.c
@@ -730,14 +730,12 @@ gst_qtdemux_loop_header (GstElement * element)
min_time = G_MAXUINT64;
for (i = 0; i < qtdemux->n_streams; i++) {
stream = qtdemux->streams[i];
-
if (stream->sample_index < stream->n_samples &&
stream->samples[stream->sample_index].timestamp < min_time) {
min_time = stream->samples[stream->sample_index].timestamp;
index = i;
}
}
-
if (index == -1) {
qtdemux->state = QTDEMUX_STATE_SEEKING_EOS;
return;
@@ -790,7 +788,8 @@ gst_qtdemux_loop_header (GstElement * element)
break;
}
} while (TRUE);
- gst_bytestream_flush_fast (qtdemux->bs, size);
+ if (size > 0)
+ gst_bytestream_flush_fast (qtdemux->bs, size);
qtdemux->offset += size;
if (buf) {
@@ -864,6 +863,10 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
(&gst_qtdemux_videosrc_template), name);
g_free (name);
stream->fps = 1. * GST_SECOND / stream->samples[0].duration;
+ if (stream->fps < 1)
+ stream->fps = 1;
+ else if (stream->fps > 100)
+ stream->fps = 100;
if (stream->caps) {
gst_caps_set_simple (stream->caps,
"width", G_TYPE_INT, stream->width,
@@ -2417,6 +2420,10 @@ qtdemux_parse_trak (GstQTDemux * qtdemux, GNode * trak)
samples[j].size =
samples_per_chunk * stream->bytes_per_frame /
stream->samples_per_packet / stream->compression;
+ else if (n_samples == 1 && j == 0 &&
+ gst_bytestream_length (qtdemux->bs) > samples[j].offset)
+ samples[j].size =
+ gst_bytestream_length (qtdemux->bs) - samples[j].offset;
else
samples[j].size = stream->bytes_per_frame;
samples[j].duration =