Segmentation fault in sparsefile - download buffer element for wav format on seek

Bhavya bhavyar.1992 at gmail.com
Wed Dec 30 03:53:49 PST 2015


Hi All,

I am working on download while playback support for streaming. In this if
url is of wav format, gstreamer crashes  on seek request.

Below are things observerd.

1) If src pad of download buffer element is in PUSH mode,  on seek event
gst_sparse_file_clear() is called
which is closing file stream and opening file with older file descriptor.  
Here fdopen return NULL pointer, errno is EBADF. 

2) No null check in gst_sparse_file_read(), ferror() with NULL pointer is
returning in crash.

Please help me understand why  below section of code is required.
  if (file->file) {
    fclose (file->file);
    file->file = fdopen (file->fd, "wb+");
  }

Also  why flushing is done only when src pad is in push mode.

Thanks & Regards,
Bhavya 







--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Segmentation-fault-in-sparsefile-download-buffer-element-for-wav-format-on-seek-tp4675083.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list