Skip to main content

Issue in org.davic.mpeg.sections.Section.table_id()

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
ramks
Offline
Joined: 2010-06-17

BasicSection.java

public int table_id() throws NoDataAvailableException

{

return getByteAt(1);

}

getByteAt returns a byte. While doing the byte to int conversion, for the numbers more than 127 java treats them as negative and we get wrong value.

Fix

return (getByteAt(1) & 0xFF);

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
greg80303
Offline
Joined: 2008-07-03

Please create a bug for this in our JIRA database

ramks
Offline
Joined: 2010-06-17

issue # OCAP_RI-502