Commit 8a932dbc authored by Tim-Philipp Müller's avatar Tim-Philipp Müller
Browse files

filesrc: return any remaining data on EOS before returning FLOW_UNEXPECTED

parent cf5de908
......@@ -836,8 +836,12 @@ gst_file_src_create_read (GstFileSrc * src, guint64 offset, guint length,
}
/* files should eos if they read 0 and more was requested */
if (G_UNLIKELY (ret == 0))
if (G_UNLIKELY (ret == 0)) {
/* .. but first we should return any remaining data */
if (bytes_read > 0)
break;
goto eos;
}
to_read -= ret;
bytes_read += ret;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment