Skip to content

Commit

Permalink
Reset file position
Browse files Browse the repository at this point in the history
The file handle might be at EOF if the input .opus file is small. So
reset the file position properly before any further handling.

Fixes #78.
  • Loading branch information
Chocobo1 committed Dec 4, 2024
1 parent 98f3ddc commit 2c96345
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/audio-in.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ input_format *open_audio_file(FILE *in, oe_enc_opt *opt)

if (formats[j].id_func(buf, buf_filled))
{
rewind(in);
/* ok, we now have something that can handle the file */
if (formats[j].open_func(in, opt, buf, buf_filled)) {
free(buf);
Expand Down

0 comments on commit 2c96345

Please sign in to comment.