Skip to content

Commit

Permalink
Merge pull request #4 from osamu620/fix-SOP
Browse files Browse the repository at this point in the history
Fix incorrect checking of SOP marker segment
  • Loading branch information
osamu620 authored Aug 17, 2020
2 parents 6d15e41 + 9566bb7 commit abe012d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions source/Tier2/read_packet.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
% if SOP present
if codingStyle.is_use_SOP() == true
WORD = hDsrc.get_word();
assert(WORD == x_FF91);
Lsop = hDsrc.get_word();
assert(Lsop == 4);
Nsop = hDsrc.get_word();
if WORD == x_FF91
Lsop = hDsrc.get_word();
assert(Lsop == 4);
Nsop = hDsrc.get_word();
else
% SOP may not be present even SPcod says SOP was used
hDsrc.pos = hDsrc.pos - 2; % rewind 2 bytes
% Nsop shall be incremented no matter SOP is present or not
end
end

%% read packet header
Expand Down

0 comments on commit abe012d

Please sign in to comment.