Commit 14647d63 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller 🐠
Browse files

mpeg4videoparse: fix criticals trying to insert configs that don't exist yet

With mpeg4videoparse drop=false config-interval=N|-1 we might be
trying to insert a config before we have actually received one,
in which case we'll try to map a NULL buffer which will generate
lots of criticals.

Fixes #855

Part-of: <!2558>
parent 7391ff71
Pipeline #436404 waiting for manual action with stages
in 1 minute and 26 seconds
...@@ -793,7 +793,8 @@ gst_mpeg4vparse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) ...@@ -793,7 +793,8 @@ gst_mpeg4vparse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
/* we need to send config now first */ /* we need to send config now first */
GST_INFO_OBJECT (parse, "inserting config in stream"); GST_INFO_OBJECT (parse, "inserting config in stream");
gst_buffer_map (mp4vparse->config, &cmap, GST_MAP_READ); if (mp4vparse->config != NULL
&& gst_buffer_map (mp4vparse->config, &cmap, GST_MAP_READ)) {
diffconf = (gst_buffer_get_size (buffer) < cmap.size) diffconf = (gst_buffer_get_size (buffer) < cmap.size)
|| gst_buffer_memcmp (buffer, 0, cmap.data, cmap.size); || gst_buffer_memcmp (buffer, 0, cmap.data, cmap.size);
csize = cmap.size; csize = cmap.size;
...@@ -814,6 +815,9 @@ gst_mpeg4vparse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame) ...@@ -814,6 +815,9 @@ gst_mpeg4vparse_pre_push_frame (GstBaseParse * parse, GstBaseParseFrame * frame)
} else { } else {
GST_INFO_OBJECT (parse, "... but avoiding duplication"); GST_INFO_OBJECT (parse, "... but avoiding duplication");
} }
} else {
GST_WARNING_OBJECT (parse, "No config received yet");
}
if (G_UNLIKELY (timestamp != -1)) { if (G_UNLIKELY (timestamp != -1)) {
mp4vparse->last_report = timestamp; mp4vparse->last_report = timestamp;
......
Supports Markdown
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