flvdemux: Update to nom 5

This commit is contained in:
Sebastian Dröge 2019-09-30 11:23:29 +03:00
parent 22982614d7
commit 429e3027b3
2 changed files with 4 additions and 2 deletions

View file

@ -13,7 +13,7 @@ glib = { git = "https://github.com/gtk-rs/glib" }
gstreamer = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
gstreamer-base = { git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" }
num-rational = { version = "0.2", default-features = false, features = [] }
nom = "4.0"
nom = "5"
flavors = {git = "https://github.com/rust-av/flavors.git"}
muldiv = "0.2"
byteorder = "1.0"

View file

@ -701,13 +701,15 @@ impl StreamingState {
element: &gst::Element,
adapter: &mut gst_base::UniqueAdapter,
) -> Result<Option<SmallVec<[Event; 4]>>, gst::ErrorMessage> {
use nom::number::complete::be_u32;
if adapter.available() < 15 {
return Ok(None);
}
let data = adapter.map(15).unwrap();
match nom::be_u32(&data[0..4]) {
match be_u32::<(_, nom::error::ErrorKind)>(&data[0..4]) {
Err(_) => unreachable!(),
Ok((_, previous_size)) => {
gst_trace!(CAT, obj: element, "Previous tag size {}", previous_size);