Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
0f6c1d6d
Commit
0f6c1d6d
authored
Oct 27, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/utils: stop using deprecated avcodec_set_dimensions
parent
ce6949d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
utils.c
libavcodec/utils.c
+9
-5
No files found.
libavcodec/utils.c
View file @
0f6c1d6d
...
...
@@ -934,15 +934,17 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code
goto
free_and_end
;
if
(
avctx
->
coded_width
&&
avctx
->
coded_height
&&
!
avctx
->
width
&&
!
avctx
->
height
)
avcodec
_set_dimensions
(
avctx
,
avctx
->
coded_width
,
avctx
->
coded_height
);
ret
=
ff
_set_dimensions
(
avctx
,
avctx
->
coded_width
,
avctx
->
coded_height
);
else
if
(
avctx
->
width
&&
avctx
->
height
)
avcodec_set_dimensions
(
avctx
,
avctx
->
width
,
avctx
->
height
);
ret
=
ff_set_dimensions
(
avctx
,
avctx
->
width
,
avctx
->
height
);
if
(
ret
<
0
)
goto
free_and_end
;
if
((
avctx
->
coded_width
||
avctx
->
coded_height
||
avctx
->
width
||
avctx
->
height
)
&&
(
av_image_check_size
(
avctx
->
coded_width
,
avctx
->
coded_height
,
0
,
avctx
)
<
0
||
av_image_check_size
(
avctx
->
width
,
avctx
->
height
,
0
,
avctx
)
<
0
))
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"ignoring invalid width/height values
\n
"
);
avcodec
_set_dimensions
(
avctx
,
0
,
0
);
ff
_set_dimensions
(
avctx
,
0
,
0
);
}
/* if the decoder init function was already called previously,
...
...
@@ -1334,7 +1336,7 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
static
int
apply_param_change
(
AVCodecContext
*
avctx
,
AVPacket
*
avpkt
)
{
int
size
=
0
;
int
size
=
0
,
ret
;
const
uint8_t
*
data
;
uint32_t
flags
;
...
...
@@ -1377,8 +1379,10 @@ static int apply_param_change(AVCodecContext *avctx, AVPacket *avpkt)
goto
fail
;
avctx
->
width
=
bytestream_get_le32
(
&
data
);
avctx
->
height
=
bytestream_get_le32
(
&
data
);
avcodec_set_dimensions
(
avctx
,
avctx
->
width
,
avctx
->
height
);
size
-=
8
;
ret
=
ff_set_dimensions
(
avctx
,
avctx
->
width
,
avctx
->
height
);
if
(
ret
<
0
)
return
ret
;
}
return
0
;
...
...
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