diff --git a/gst/elements/gstfilesink.c b/gst/elements/gstfilesink.c index a87e00c159..22ec0c0ca8 100644 --- a/gst/elements/gstfilesink.c +++ b/gst/elements/gstfilesink.c @@ -297,6 +297,16 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event) break; } break; + case GST_EVENT_DISCONTINUOUS: + { + gint64 offset; + + if (gst_event_discont_get_value (event, GST_FORMAT_BYTES, &offset)) + fseek(filesink->file, offset, SEEK_SET); + + gst_event_free (event); + break; + } case GST_EVENT_NEW_MEDIA: /* we need to open a new file! */ gst_filesink_close_file(filesink); diff --git a/plugins/elements/gstfilesink.c b/plugins/elements/gstfilesink.c index a87e00c159..22ec0c0ca8 100644 --- a/plugins/elements/gstfilesink.c +++ b/plugins/elements/gstfilesink.c @@ -297,6 +297,16 @@ gst_filesink_handle_event (GstPad *pad, GstEvent *event) break; } break; + case GST_EVENT_DISCONTINUOUS: + { + gint64 offset; + + if (gst_event_discont_get_value (event, GST_FORMAT_BYTES, &offset)) + fseek(filesink->file, offset, SEEK_SET); + + gst_event_free (event); + break; + } case GST_EVENT_NEW_MEDIA: /* we need to open a new file! */ gst_filesink_close_file(filesink);