decklink: Fix crash with closed-captions signal and 10-bit input

Only free the parser if there is one. If the format hadn't changed but
had always been 10-bit, there might genuinely be no parser.

https://bugzilla.gnome.org/show_bug.cgi?id=796030
This commit is contained in:
Vivia Nikolaidou 2018-05-11 17:39:35 +03:00
parent 752d2bb6e3
commit 31aafdbea5

View file

@ -800,7 +800,7 @@ extract_cc_from_vbi (GstDecklinkVideoSrc * self, GstBuffer ** buffer,
return;
}
if (videoformat != self->anc_vformat) {
if (videoformat != self->anc_vformat && self->vbiparser) {
gst_video_vbi_parser_free (self->vbiparser);
self->vbiparser = NULL;
}