Skip to content

Commit

Permalink
avformat/av1dec: don't update temporal_unit_size after it's no longer…
Browse files Browse the repository at this point in the history
… used

Signed-off-by: James Almer <[email protected]>
  • Loading branch information
jamrial committed Aug 16, 2020
1 parent 2250dc4 commit b6e92d9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions libavformat/av1dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,11 @@ static int annexb_probe(const AVProbeData *p)
if (ret < 0 || ((int64_t)frame_unit_size + ret) > temporal_unit_size)
return 0;
cnt += ret;
temporal_unit_size -= ret;
ret = leb(&pb, &obu_unit_size);
if (ret < 0 || ((int64_t)obu_unit_size + ret) >= frame_unit_size)
return 0;
cnt += ret;

temporal_unit_size -= obu_unit_size + ret;
frame_unit_size -= obu_unit_size + ret;

avio_skip(&pb, obu_unit_size);
Expand Down Expand Up @@ -192,7 +190,6 @@ static int annexb_probe(const AVProbeData *p)
if (ret >= 0)
return ret;

temporal_unit_size -= obu_unit_size + ret;
frame_unit_size -= obu_unit_size + ret;
} while (frame_unit_size);

Expand Down

0 comments on commit b6e92d9

Please sign in to comment.