Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
EdosL0Util
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SIPS
EdosL0Util
Commits
ecbf80e9
Commit
ecbf80e9
authored
3 years ago
by
Bruce Flynn
Browse files
Options
Downloads
Patches
Plain Diff
merge: don't crash for non-order apids
parent
4419cdf0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
edosl0util/merge.py
+4
-6
4 additions, 6 deletions
edosl0util/merge.py
with
4 additions
and
6 deletions
edosl0util/merge.py
+
4
−
6
View file @
ecbf80e9
...
@@ -10,8 +10,7 @@
...
@@ -10,8 +10,7 @@
"""
"""
import
logging
import
logging
import
os
import
os
from
collections
import
deque
,
OrderedDict
from
collections
import
deque
from
functools
import
total_ordering
from
.
import
eos
as
_eos
from
.
import
eos
as
_eos
...
@@ -71,17 +70,18 @@ class _Ptr(object):
...
@@ -71,17 +70,18 @@ class _Ptr(object):
def
_sort_key
(
p
,
order
=
None
,
eos
=
False
):
def
_sort_key
(
p
,
order
=
None
,
eos
=
False
):
if
eos
and
p
.
apid
==
64
:
if
eos
and
p
.
apid
==
64
:
return
_eos
.
_modis_sort_key
(
p
)
return
_eos
.
_modis_sort_key
(
p
)
return
(
p
.
stamp
,
order
.
index
(
p
.
apid
)
if
order
else
p
.
apid
)
apid_order
=
order
.
index
(
p
.
apid
)
if
p
.
apid
in
order
else
0
return
(
p
.
stamp
,
apid_order
if
order
else
p
.
apid
)
def
read_packet_index
(
stream
,
order
=
None
,
eos
=
False
):
def
read_packet_index
(
stream
,
order
=
None
,
eos
=
False
):
order
=
tuple
(
order
)
if
order
else
tuple
()
index
=
deque
()
index
=
deque
()
try
:
try
:
# drop any leading hanging packets
# drop any leading hanging packets
count
=
0
count
=
0
packet
=
stream
.
next
()
packet
=
stream
.
next
()
while
not
packet
.
stamp
:
while
not
packet
.
stamp
:
#while not (packet.is_first() or packet.is_standalone()):
packet
=
stream
.
next
()
packet
=
stream
.
next
()
count
+=
1
count
+=
1
if
count
:
if
count
:
...
@@ -89,7 +89,6 @@ def read_packet_index(stream, order=None, eos=False):
...
@@ -89,7 +89,6 @@ def read_packet_index(stream, order=None, eos=False):
while
True
:
while
True
:
if
not
packet
.
stamp
:
if
not
packet
.
stamp
:
#if not (packet.is_first() or packet.is_standalone()):
# corrupt packet groups can cause apid mismatch
# corrupt packet groups can cause apid mismatch
# so skip until we get to the next group
# so skip until we get to the next group
packet
=
stream
.
next
()
packet
=
stream
.
next
()
...
@@ -107,7 +106,6 @@ def read_packet_index(stream, order=None, eos=False):
...
@@ -107,7 +106,6 @@ def read_packet_index(stream, order=None, eos=False):
# collect all packets for this timecode/group
# collect all packets for this timecode/group
packet
=
stream
.
next
()
packet
=
stream
.
next
()
while
not
packet
.
stamp
:
while
not
packet
.
stamp
:
#while not (packet.is_first() or packet.is_standalone()):
# Bail if we're collecting group packets and apids don't match
# Bail if we're collecting group packets and apids don't match
# This means group is corrupt
# This means group is corrupt
if
ptr
.
apid
!=
packet
.
apid
:
if
ptr
.
apid
!=
packet
.
apid
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment