Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
4a8d5135
Commit
4a8d5135
authored
20 years ago
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing demuxing of vc2_intro.avi
Originally committed as revision 3610 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
7494cac0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
avidec.c
libavformat/avidec.c
+8
-9
No files found.
libavformat/avidec.c
View file @
4a8d5135
...
...
@@ -383,18 +383,18 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
AVIContext
*
avi
=
s
->
priv_data
;
ByteIOContext
*
pb
=
&
s
->
pb
;
int
n
,
d
[
8
],
size
;
offset_t
i
;
offset_t
i
,
sync
;
void
*
dstr
;
memset
(
d
,
-
1
,
sizeof
(
int
)
*
8
);
if
(
avi
->
dv_demux
)
{
size
=
dv_get_packet
(
avi
->
dv_demux
,
pkt
);
if
(
size
>=
0
)
return
size
;
}
for
(
i
=
url_ftell
(
pb
);
!
url_feof
(
pb
);
i
++
)
{
resync:
memset
(
d
,
-
1
,
sizeof
(
int
)
*
8
);
for
(
i
=
sync
=
url_ftell
(
pb
);
!
url_feof
(
pb
);
i
++
)
{
int
j
;
if
(
i
>=
avi
->
movi_end
)
{
...
...
@@ -426,10 +426,8 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
//parse JUNK
||
(
d
[
0
]
==
'J'
&&
d
[
1
]
==
'U'
&&
d
[
2
]
==
'N'
&&
d
[
3
]
==
'K'
)){
url_fskip
(
pb
,
size
);
i
+=
size
;
memset
(
d
,
-
1
,
sizeof
(
int
)
*
8
);
//av_log(NULL, AV_LOG_DEBUG, "SKIP\n");
continue
;
goto
resync
;
}
if
(
d
[
0
]
>=
'0'
&&
d
[
0
]
<=
'9'
...
...
@@ -446,7 +444,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
st
=
s
->
streams
[
n
];
ast
=
st
->
priv_data
;
if
(
(
ast
->
prefix_count
<
5
&&
d
[
2
]
<
128
&&
d
[
3
]
<
128
)
||
if
(
(
(
ast
->
prefix_count
<
5
||
sync
+
9
>
i
)
&&
d
[
2
]
<
128
&&
d
[
3
]
<
128
)
||
d
[
2
]
*
256
+
d
[
3
]
==
ast
->
prefix
/*||
(d[2] == 'd' && d[3] == 'c') ||
(d[2] == 'w' && d[3] == 'b')*/
)
{
...
...
@@ -525,6 +523,7 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
st
->
codec
.
palctrl
->
palette
[
k
]
=
b
+
(
g
<<
8
)
+
(
r
<<
16
);
}
st
->
codec
.
palctrl
->
palette_changed
=
1
;
goto
resync
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment