Skip to content

Commit

Permalink
libmpg123: first hot fix for bug 322
Browse files Browse the repository at this point in the history
git-svn-id: svn://scm.orgis.org/mpg123/trunk@5432 35dc7657-300d-0410-a2e5-dc2837fedb53
  • Loading branch information
thor committed Oct 20, 2024
1 parent fe2b949 commit 52f1c9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libmpg123/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,12 @@ int INT123_read_frame(mpg123_handle *fr)
debug2("read frame body of %i at %"PRIi64, fr->framesize, framepos+4);
if((ret=fr->rd->read_frame_body(fr,newbuf,fr->framesize))<0)
{
freeformat_count = 0;
// Re-decoding the old header again _must_ work.
// Need to ensure that we do not prepare for actual frame data when there is none
// (messing with header change info and decoder state).
if(ret != MPG123_NEED_MORE && fr->oldhead)
decode_header(fr, fr->oldhead, &freeformat_count);
/* if failed: flip back */
debug1("%s", ret == MPG123_NEED_MORE ? "need more" : "read error");
goto read_frame_bad;
Expand Down

0 comments on commit 52f1c9d

Please sign in to comment.