mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
schrodec: Fix resync bug due to adapter API change
gst_adapter_masked_scan_uint32() changed slightly from when this element was in Schroedinger. Oops.
This commit is contained in:
parent
62b692d549
commit
2d28da1994
1 changed files with 8 additions and 3 deletions
|
@ -545,6 +545,7 @@ gst_schro_dec_scan_for_sync (GstBaseVideoDecoder * base_video_decoder,
|
||||||
{
|
{
|
||||||
GstAdapter *adapter = base_video_decoder->input_adapter;
|
GstAdapter *adapter = base_video_decoder->input_adapter;
|
||||||
int n_available;
|
int n_available;
|
||||||
|
int ret;
|
||||||
|
|
||||||
n_available = gst_adapter_available (adapter) - offset;
|
n_available = gst_adapter_available (adapter) - offset;
|
||||||
|
|
||||||
|
@ -556,10 +557,14 @@ gst_schro_dec_scan_for_sync (GstBaseVideoDecoder * base_video_decoder,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
n_available -= 3;
|
n = MIN (n, n_available - 3);
|
||||||
|
|
||||||
return gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x42424344,
|
ret = gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x42424344,
|
||||||
offset, MIN (n, n_available - 3));
|
offset, n);
|
||||||
|
if (ret == -1) {
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue