diff options
author | aybe aybe <aybe.one-at-hotmail.com@ffmpeg.org> | 2024-01-02 02:49:26 +0000 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-01-16 01:34:56 +0100 |
commit | 36b402f80d0adc6b0687e014e3f51a00b72335eb (patch) | |
tree | 3c097f695e090c69cff4bb79071389918bea7b6e /libavcodec/mdec.c | |
parent | e664f4465ab0f76adcf2452e85741ee468f507b7 (diff) |
avcodec/mdec: DC reading for STRv1 is like STRv2
As I understand, support for .STR files is broken for almost 10 years now (since 161442ff2c4b0dd8a5072c6bbe6bf55303fffccf it seems).
Currently, ffmpeg fails with tons of errors like this on version 1 STRs, e.g. Wipeout 1:
[mdec @ 00000000027c72c0] ac-tex damaged at 1 9
What happens is that only the audio is present in the video file.
Anyway, that one character patch fixes the problem, video is now rendered.
Signed-off-by: aybe <aybe@users.noreply.github.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mdec.c')
-rw-r--r-- | libavcodec/mdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index 44b12471a9..c4904216b8 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -68,7 +68,7 @@ static inline int mdec_decode_block_intra(MDECContext *a, int16_t *block, int n) const int qscale = a->qscale; /* DC coefficient */ - if (a->version == 2) { + if (a->version <= 2) { block[0] = 2 * get_sbits(&a->gb, 10) + 1024; } else { component = (n <= 3 ? 0 : n - 4 + 1); |