diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gst/qtdemux/qtdemux.c | 15 |
2 files changed, 18 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2005-04-18 Ronald S. Bultje <rbultje@ronald.bitfreak.net> + * gst/qtdemux/qtdemux.c: (gst_qtdemux_loop_header): + Prevent hangs that I apparently introduced a while ago. + +2005-04-18 Ronald S. Bultje <rbultje@ronald.bitfreak.net> + * ext/pango/gsttextoverlay.c: (render_text), (gst_text_overlay_blit_yuv420): Don't crop off bottom (fixes #172845 minus a pixel at the left in diff --git a/gst/qtdemux/qtdemux.c b/gst/qtdemux/qtdemux.c index acb5f8a4..b9350097 100644 --- a/gst/qtdemux/qtdemux.c +++ b/gst/qtdemux/qtdemux.c @@ -628,7 +628,7 @@ gst_qtdemux_loop_header (GstElement * element) case GST_MAKE_FOURCC ('w', 'i', 'd', 'e'): case GST_MAKE_FOURCC ('P', 'I', 'C', 'T'): case GST_MAKE_FOURCC ('p', 'n', 'o', 't'): - break; + goto the_d; case GST_MAKE_FOURCC ('m', 'o', 'o', 'v'): { GstBuffer *moov; @@ -659,11 +659,22 @@ gst_qtdemux_loop_header (GstElement * element) qtdemux->state = QTDEMUX_STATE_MOVIE; break; } + the_d: default: { + guint32 pending; + GST_LOG ("unknown %08x '" GST_FOURCC_FORMAT "' at %d", fourcc, GST_FOURCC_ARGS (fourcc), cur_offset); - gst_bytestream_flush (qtdemux->bs, length); + gst_bytestream_get_status (qtdemux->bs, &pending, NULL); + if (length <= pending) + gst_bytestream_flush_fast (qtdemux->bs, length); + else { + offset = cur_offset + length; + if (!gst_bytestream_seek (qtdemux->bs, offset, GST_SEEK_METHOD_SET)) { + gst_bytestream_flush (qtdemux->bs, length); + } + } break; } } |