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
35603134
Commit
35603134
authored
Sep 23, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/vc1dec: fix propagating error codes from various functions
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a51f3b53
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
vc1dec.c
libavcodec/vc1dec.c
+13
-12
No files found.
libavcodec/vc1dec.c
View file @
35603134
...
@@ -5581,6 +5581,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
...
@@ -5581,6 +5581,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
VC1Context
*
v
=
avctx
->
priv_data
;
VC1Context
*
v
=
avctx
->
priv_data
;
MpegEncContext
*
s
=
&
v
->
s
;
MpegEncContext
*
s
=
&
v
->
s
;
GetBitContext
gb
;
GetBitContext
gb
;
int
ret
;
/* save the container output size for WMImage */
/* save the container output size for WMImage */
v
->
output_width
=
avctx
->
width
;
v
->
output_width
=
avctx
->
width
;
...
@@ -5597,13 +5598,13 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
...
@@ -5597,13 +5598,13 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
avctx
->
flags
|=
CODEC_FLAG_EMU_EDGE
;
avctx
->
flags
|=
CODEC_FLAG_EMU_EDGE
;
v
->
s
.
flags
|=
CODEC_FLAG_EMU_EDGE
;
v
->
s
.
flags
|=
CODEC_FLAG_EMU_EDGE
;
if
(
ff_vc1_init_common
(
v
)
<
0
)
if
(
(
ret
=
ff_vc1_init_common
(
v
)
)
<
0
)
return
-
1
;
return
ret
;
// ensure static VLC tables are initialized
// ensure static VLC tables are initialized
if
(
ff_msmpeg4_decode_init
(
avctx
)
<
0
)
if
(
(
ret
=
ff_msmpeg4_decode_init
(
avctx
)
)
<
0
)
return
-
1
;
return
ret
;
if
(
ff_vc1_decode_init_alloc_tables
(
v
)
<
0
)
if
(
(
ret
=
ff_vc1_decode_init_alloc_tables
(
v
)
)
<
0
)
return
-
1
;
return
ret
;
// Hack to ensure the above functions will be called
// Hack to ensure the above functions will be called
// again once we know all necessary settings.
// again once we know all necessary settings.
// That this is necessary might indicate a bug.
// That this is necessary might indicate a bug.
...
@@ -5622,8 +5623,8 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
...
@@ -5622,8 +5623,8 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
init_get_bits
(
&
gb
,
avctx
->
extradata
,
avctx
->
extradata_size
*
8
);
init_get_bits
(
&
gb
,
avctx
->
extradata
,
avctx
->
extradata_size
*
8
);
if
(
ff_vc1_decode_sequence_header
(
avctx
,
v
,
&
gb
)
<
0
)
if
(
(
ret
=
ff_vc1_decode_sequence_header
(
avctx
,
v
,
&
gb
)
)
<
0
)
return
-
1
;
return
ret
;
count
=
avctx
->
extradata_size
*
8
-
get_bits_count
(
&
gb
);
count
=
avctx
->
extradata_size
*
8
-
get_bits_count
(
&
gb
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
...
@@ -5657,16 +5658,16 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
...
@@ -5657,16 +5658,16 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
init_get_bits
(
&
gb
,
buf2
,
buf2_size
*
8
);
init_get_bits
(
&
gb
,
buf2
,
buf2_size
*
8
);
switch
(
AV_RB32
(
start
))
{
switch
(
AV_RB32
(
start
))
{
case
VC1_CODE_SEQHDR
:
case
VC1_CODE_SEQHDR
:
if
(
ff_vc1_decode_sequence_header
(
avctx
,
v
,
&
gb
)
<
0
)
{
if
(
(
ret
=
ff_vc1_decode_sequence_header
(
avctx
,
v
,
&
gb
)
)
<
0
)
{
av_free
(
buf2
);
av_free
(
buf2
);
return
-
1
;
return
ret
;
}
}
seq_initialized
=
1
;
seq_initialized
=
1
;
break
;
break
;
case
VC1_CODE_ENTRYPOINT
:
case
VC1_CODE_ENTRYPOINT
:
if
(
ff_vc1_decode_entry_point
(
avctx
,
v
,
&
gb
)
<
0
)
{
if
(
(
ret
=
ff_vc1_decode_entry_point
(
avctx
,
v
,
&
gb
)
)
<
0
)
{
av_free
(
buf2
);
av_free
(
buf2
);
return
-
1
;
return
ret
;
}
}
ep_initialized
=
1
;
ep_initialized
=
1
;
break
;
break
;
...
...
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