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
b53febc1
Commit
b53febc1
authored
Oct 27, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp3: stop using deprecated avcodec_set_dimensions
parent
3cfdb912
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
vp3.c
libavcodec/vp3.c
+5
-8
No files found.
libavcodec/vp3.c
View file @
b53febc1
...
...
@@ -2166,6 +2166,7 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
Vp3DecodeContext
*
s
=
avctx
->
priv_data
;
int
visible_width
,
visible_height
,
colorspace
;
int
offset_x
=
0
,
offset_y
=
0
;
int
ret
;
AVRational
fps
,
aspect
;
s
->
theora
=
get_bits_long
(
gb
,
24
);
...
...
@@ -2182,12 +2183,6 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
visible_width
=
s
->
width
=
get_bits
(
gb
,
16
)
<<
4
;
visible_height
=
s
->
height
=
get_bits
(
gb
,
16
)
<<
4
;
if
(
av_image_check_size
(
s
->
width
,
s
->
height
,
0
,
avctx
)){
av_log
(
avctx
,
AV_LOG_ERROR
,
"Invalid dimensions (%dx%d)
\n
"
,
s
->
width
,
s
->
height
);
s
->
width
=
s
->
height
=
0
;
return
-
1
;
}
if
(
s
->
theora
>=
0x030200
)
{
visible_width
=
get_bits_long
(
gb
,
24
);
visible_height
=
get_bits_long
(
gb
,
24
);
...
...
@@ -2234,9 +2229,11 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
if
(
visible_width
<=
s
->
width
&&
visible_width
>
s
->
width
-
16
&&
visible_height
<=
s
->
height
&&
visible_height
>
s
->
height
-
16
&&
!
offset_x
&&
(
offset_y
==
s
->
height
-
visible_height
))
avcodec
_set_dimensions
(
avctx
,
visible_width
,
visible_height
);
ret
=
ff
_set_dimensions
(
avctx
,
visible_width
,
visible_height
);
else
avcodec_set_dimensions
(
avctx
,
s
->
width
,
s
->
height
);
ret
=
ff_set_dimensions
(
avctx
,
s
->
width
,
s
->
height
);
if
(
ret
<
0
)
return
ret
;
if
(
colorspace
==
1
)
{
avctx
->
color_primaries
=
AVCOL_PRI_BT470M
;
...
...
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