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
398e3a59
Commit
398e3a59
authored
May 09, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: replace uses of deprecated avcodec_set_dimensions()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
3554c2fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
smvjpegdec.c
libavcodec/smvjpegdec.c
+5
-2
vc1.c
libavcodec/vc1.c
+11
-2
No files found.
libavcodec/smvjpegdec.c
View file @
398e3a59
...
...
@@ -153,8 +153,11 @@ static int smvjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_siz
/* We shouldn't get here if frames_per_jpeg <= 0 because this was rejected
in init */
avcodec_set_dimensions
(
avctx
,
mjpeg_data
->
width
,
mjpeg_data
->
height
/
s
->
frames_per_jpeg
);
ret
=
ff_set_dimensions
(
avctx
,
mjpeg_data
->
width
,
mjpeg_data
->
height
/
s
->
frames_per_jpeg
);
if
(
ret
<
0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Failed to set dimensions
\n
"
);
return
ret
;
}
if
(
*
data_size
)
{
s
->
picture
[
1
]
->
extended_data
=
NULL
;
...
...
libavcodec/vc1.c
View file @
398e3a59
...
...
@@ -372,7 +372,11 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
if
(
v
->
res_sprite
)
{
int
w
=
get_bits
(
gb
,
11
);
int
h
=
get_bits
(
gb
,
11
);
avcodec_set_dimensions
(
v
->
s
.
avctx
,
w
,
h
);
int
ret
=
ff_set_dimensions
(
v
->
s
.
avctx
,
w
,
h
);
if
(
ret
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set dimensions %d %d
\n
"
,
w
,
h
);
return
ret
;
}
skip_bits
(
gb
,
5
);
//frame rate
v
->
res_x8
=
get_bits1
(
gb
);
if
(
get_bits1
(
gb
))
{
// something to do with DC VLC selection
...
...
@@ -516,6 +520,7 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex
{
int
i
;
int
w
,
h
;
int
ret
;
av_log
(
avctx
,
AV_LOG_DEBUG
,
"Entry point: %08X
\n
"
,
show_bits_long
(
gb
,
32
));
v
->
broken_link
=
get_bits1
(
gb
);
...
...
@@ -545,7 +550,11 @@ int ff_vc1_decode_entry_point(AVCodecContext *avctx, VC1Context *v, GetBitContex
w
=
v
->
max_coded_width
;
h
=
v
->
max_coded_height
;
}
avcodec_set_dimensions
(
avctx
,
w
,
h
);
if
((
ret
=
ff_set_dimensions
(
avctx
,
w
,
h
))
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Failed to set dimensions %d %d
\n
"
,
w
,
h
);
return
ret
;
}
if
(
v
->
extended_mv
)
v
->
extended_dmv
=
get_bits1
(
gb
);
if
((
v
->
range_mapy_flag
=
get_bits1
(
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