fftools/ffmpeg: store the input file index in InputFile

Use it to simplify some code and fix two off-by-one errors.

Similar to what was previously done for OutputFile.
This commit is contained in:
Anton Khirnov
2022-03-21 17:21:46 +01:00
parent 9139ea4c8d
commit cc2b7f4625
2 changed files with 7 additions and 4 deletions

View File

@@ -408,6 +408,8 @@ typedef struct InputStream {
} InputStream;
typedef struct InputFile {
int index;
AVFormatContext *ctx;
int eof_reached; /* true if eof reached */
int eagain; /* true if last read attempt returned EAGAIN */