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
487bce53
Commit
487bce53
authored
Apr 12, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10l (use before malloc)
Originally committed as revision 1768 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
6692d61b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
h263dec.c
libavcodec/h263dec.c
+9
-3
wmv2.c
libavcodec/wmv2.c
+10
-1
No files found.
libavcodec/h263dec.c
View file @
487bce53
...
...
@@ -643,14 +643,21 @@ retry:
ff_er_frame_start
(
s
);
//the second part of the wmv2 header contains the MB skip bits which are stored in current_picture->mb_type
//which isnt available before MPV_frame_start()
if
(
s
->
msmpeg4_version
==
5
){
if
(
ff_wmv2_decode_secondary_picture_header
(
s
)
<
0
)
return
-
1
;
}
/* decode each macroblock */
s
->
mb_x
=
0
;
s
->
mb_y
=
0
;
decode_slice
(
s
);
while
(
s
->
mb_y
<
s
->
mb_height
&&
s
->
gb
.
size_in_bits
-
get_bits_count
(
&
s
->
gb
)
>
16
){
while
(
s
->
mb_y
<
s
->
mb_height
){
if
(
s
->
msmpeg4_version
){
if
(
s
->
mb_x
!=
0
||
(
s
->
mb_y
%
s
->
slice_height
)
!=
0
)
if
(
s
->
mb_x
!=
0
||
(
s
->
mb_y
%
s
->
slice_height
)
!=
0
||
get_bits_count
(
&
s
->
gb
)
>
s
->
gb
.
size_in_bits
)
break
;
}
else
{
if
(
ff_h263_resync
(
s
)
<
0
)
...
...
@@ -733,7 +740,6 @@ retry:
*
pict
=
*
(
AVFrame
*
)
&
s
->
last_picture
;
ff_print_debug_info
(
s
,
s
->
last_picture_ptr
);
}
/* Return the Picture timestamp as the frame number */
/* we substract 1 because it is added on utils.c */
...
...
libavcodec/wmv2.c
View file @
487bce53
...
...
@@ -349,7 +349,7 @@ static int decode_ext_header(Wmv2Context *w){
int
ff_wmv2_decode_picture_header
(
MpegEncContext
*
s
)
{
Wmv2Context
*
const
w
=
(
Wmv2Context
*
)
s
;
int
code
,
i
;
int
code
;
#if 0
{
...
...
@@ -370,6 +370,15 @@ return -1;
printf
(
"I7:%X/
\n
"
,
code
);
}
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
if
(
s
->
qscale
<
0
)
return
-
1
;
return
0
;
}
int
ff_wmv2_decode_secondary_picture_header
(
MpegEncContext
*
s
)
{
Wmv2Context
*
const
w
=
(
Wmv2Context
*
)
s
;
if
(
s
->
pict_type
==
I_TYPE
)
{
if
(
w
->
j_type_bit
)
w
->
j_type
=
get_bits1
(
&
s
->
gb
);
...
...
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