mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mdec: DC reading for STRv1 is like STRv2
As I understand, support for .STR files is broken for almost 10 years now (since 161442ff2c
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>
This commit is contained in:
parent
e664f4465a
commit
36b402f80d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue