[Bug 796863] vaapih264dec: H264 parse stops if missing an SPS/PPS
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Aug 2 12:38:18 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=796863
--- Comment #30 from Matteo Valdina <matteo.valdina at gmail.com> ---
Here the idea:
diff --git a/gst/vaapi/gstvaapidecode.c b/gst/vaapi/gstvaapidecode.c
index d11b8032..53d08a6b 100644
--- a/gst/vaapi/gstvaapidecode.c
+++ b/gst/vaapi/gstvaapidecode.c
@@ -764,6 +764,13 @@ error_decode:
("Decode error %d", status), ret);
break;
}
+
+ if (ret != GST_FLOW_NOT_SUPPORTED) {
+ GST_DEBUG ("Requesting a key unit");
+ gst_pad_push_event (GST_VIDEO_DECODER_SINK_PAD (decode),
+ gst_video_event_new_upstream_force_key_unit (GST_CLOCK_TIME_NONE,
+ FALSE, 0));
+ }
gst_video_decoder_drop_frame (vdec, frame);
return ret;
}
@@ -1176,8 +1183,13 @@ gst_vaapidecode_parse_frame (GstVideoDecoder * vdec,
break;
default:
GST_ERROR ("parse error %d", status);
- ret = GST_FLOW_EOS;
+ /* just keep parsing, the decoder should have flushed the broken unit */
+ ret = GST_VAAPI_DECODE_FLOW_PARSE_DATA;
decode->current_frame_size = 0;
+ GST_DEBUG ("Requesting a key unit");
+ gst_pad_push_event (GST_VIDEO_DECODER_SINK_PAD (decode),
+ gst_video_event_new_upstream_force_key_unit (GST_CLOCK_TIME_NONE,
+ FALSE, 0));
break;
}
return ret;
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list