GNOME Bugzilla – Bug 775204
vaapipostproc: gst buffer arrives before caps event in queue
Last modified: 2017-01-06 12:38:03 UTC
Failures: validate.file.transcode.to_rawaudio_and_prores_in_quicktime.mp3_h264_0_mp4 validate.file.transcode.to_vorbis_and_theora_in_ogg.mp3_h264_1_mp4 and 3-4 more testcases like this. Investigation so far: Queue(the fisrt queue in encodebin, before streamsplitter) get gstbuffer, then caps event arrives. It tries to push buffer first, and fails due to not-negotiated. I don't know why gst buffer arrives at the queue even before negotiation is done in encodebin and caps event arrives.
More investigation: The first buffer that I mentioned above has vaapi surface caps feature. That's why it fails with not-negotiated. It should be changed to system memory before start processing in this pipeline. And currently vaapipostproc doesn't notify when it's changed.
Created attachment 342813 [details] [review] vaapipostproc: update src caps if changed to notify downstream If src pad caps is changed, it needs to notify downstream. In addition, do not set passthrough in this case. Otherwise, if it's TRUE, transform sometimes starts processing before caps change. The passthrough value will be set in fixate later in this case.
Review of attachment 342813 [details] [review]: Thanks! Good catch! Just a silly code style thing. ::: gst/vaapi/gstvaapipostproc.c @@ +1314,3 @@ + if (!src_caps_changed) + /* set passthrough according to caps changes or filter changes */ + gst_vaapipostproc_set_passthrough (trans); please wrap the if with braces or move the comment above the if
Created attachment 342818 [details] [review] vaapipostproc: update src caps if changed to notify downstream If src pad caps is changed, it needs to notify downstream. In addition, do not set passthrough in this case. Otherwise, if it's TRUE, transform sometimes starts processing before caps change. The passthrough value will be set in fixate later in this case.
Review of attachment 342818 [details] [review]: lgtm
commit b23640fb2715c215c739a624a9201420d47004d4 Author: Hyunjun Ko <zzoon@igalia.com> Date: Wed Jan 4 19:23:06 2017 +0900 vaapipostproc: notify if src pad caps changed If src pad caps have changed, it needs to notify it downstream. In addition, do not set passthrough if they have changed. Otherwise, transform sometimes starts processing before caps change. The passthrough value will be set in fixate later in this case. https://bugzilla.gnome.org/show_bug.cgi?id=775204
commit 4ca80871e808db8d24b375078b93b92cf0fd0c0d Author: Hyunjun Ko <zzoon@igalia.com> Date: Wed Jan 4 19:23:06 2017 +0900 vaapipostproc: notify if src pad caps changed If src pad caps have changed, it needs to notify it downstream. In addition, do not set passthrough if they have changed. Otherwise, transform sometimes starts processing before caps change. The passthrough value will be set in fixate later in this case. https://bugzilla.gnome.org/show_bug.cgi?id=775204