summaryrefslogtreecommitdiff
path: root/gst/asfdemux
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2016-11-22 16:54:26 +0100
committerEdward Hervey <bilboed@bilboed.com>2016-11-22 18:21:46 +0100
commitcc04255e946f28acb4a60cc570c0c460c2f0154f (patch)
treef60c15ba231400998d2a8116fdb65c89846a14fb /gst/asfdemux
parent45c7826d76dfcb94cebbc57208c553d432fdc4a9 (diff)
downloadgstreamer-plugins-ugly-cc04255e946f28acb4a60cc570c0c460c2f0154f.tar.gz
asfdemux: Handle incomplete header in pull mode
pulling headers is meant to complete as a whole. If we don't have enough data, it's an error. Avoids pipeline hangs on corrupted files https://bugzilla.gnome.org/show_bug.cgi?id=774846
Diffstat (limited to 'gst/asfdemux')
-rw-r--r--gst/asfdemux/gstasfdemux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index 53dceea0..c9d7c370 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -1245,6 +1245,8 @@ parse_failed:
if (buf)
gst_buffer_unmap (buf, &map);
gst_buffer_replace (&buf, NULL);
+ if (flow == ASF_FLOW_NEED_MORE_DATA)
+ flow = GST_FLOW_ERROR;
*pflow = flow;
return FALSE;
}