Skip to content

Commit

Permalink
fix reporting of offset on encountering unknown data
Browse files Browse the repository at this point in the history
  • Loading branch information
Lawrence D'Oliveiro committed Apr 5, 2012
1 parent ba9ba9c commit b44300c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mpeg2desc.c
Expand Up @@ -435,7 +435,7 @@ int main(int argc,char **argv)
bool fetchhdr = true;
while (true)
{
const int disppos = inputpos; /* where packet actually started */
const int disppos = fetchhdr ? inputpos : inputpos - 4; /* where packet actually started */
if (fetchhdr)
{
forceread(&hdr, 4, false);
Expand Down Expand Up @@ -919,7 +919,7 @@ int main(int argc,char **argv)
do
{
if (outputenglish && !nounknown)
printf("%08x: unknown hdr: %08x\n",disppos,ntohl(hdr));
printf("%08x: unknown hdr: %08x\n", disppos, ntohl(hdr));
hdr >>= 8;
hdr |= forceread1(true) << 24;
}
Expand Down

0 comments on commit b44300c

Please sign in to comment.