diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2004-10-02 18:30:49 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2004-10-02 18:30:49 +0000 |
commit | 530ec15806fc901df55ec97c88e07792f627bd62 (patch) | |
tree | 82e30d0a09eb6ee06bce070791d308932d6d8d61 /ext/ffmpeg/gstffmpegprotocol.c | |
parent | 79d12888875d1a83ef6b1e1a6fd4d9ed2726525b (diff) |
ext/ffmpeg/gstffmpegdemux.c: Signal no_more_pads.
Original commit message from CVS:
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop):
Signal no_more_pads.
* ext/ffmpeg/gstffmpegprotocol.c: (gst_ffmpegdata_read),
(gst_ffmpegdata_seek):
Handle events.
Diffstat (limited to 'ext/ffmpeg/gstffmpegprotocol.c')
-rw-r--r-- | ext/ffmpeg/gstffmpegprotocol.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/ext/ffmpeg/gstffmpegprotocol.c b/ext/ffmpeg/gstffmpegprotocol.c index 373b7e7..cd0ca4b 100644 --- a/ext/ffmpeg/gstffmpegprotocol.c +++ b/ext/ffmpeg/gstffmpegprotocol.c @@ -145,6 +145,13 @@ gst_ffmpegdata_read (URLContext * h, unsigned char *buf, int size) have_event = FALSE; gst_event_unref (event); break; + case GST_EVENT_FLUSH: + gst_event_unref (event); + break; + case GST_EVENT_INTERRUPT: + have_event = FALSE; + gst_event_unref (event); + break; default: gst_pad_event_default (info->pad, event); break; @@ -219,6 +226,7 @@ gst_ffmpegdata_seek (URLContext * h, offset_t pos, int whence) /* handle discont */ gst_bytestream_seek (info->bs, pos, seek_type); + /* prevent eos */ if (gst_bytestream_tell (info->bs) == gst_bytestream_length (info->bs)) { @@ -239,11 +247,15 @@ gst_ffmpegdata_seek (URLContext * h, offset_t pos, int whence) g_warning ("unexpected/unwanted EOS event after seek"); info->eos = TRUE; gst_event_unref (event); - break; + return -1; case GST_EVENT_DISCONTINUOUS: - gst_bytestream_flush_fast (info->bs, remaining); gst_event_unref (event); /* we expect this */ break; + case GST_EVENT_FLUSH: + break; + case GST_EVENT_INTERRUPT: + gst_event_unref (event); + return -1; default: gst_pad_event_default (info->pad, event); break; |