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
d8ea66ab
Commit
d8ea66ab
authored
Nov 13, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/utils: remove usage of AVCodecContext accessors
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
03dae121
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
utils.c
libavformat/utils.c
+9
-5
No files found.
libavformat/utils.c
View file @
d8ea66ab
...
...
@@ -4028,11 +4028,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
ret
=
avcodec_parameters_from_context
(
st
->
codecpar
,
st
->
internal
->
avctx
);
if
(
ret
<
0
)
goto
find_stream_info_err
;
#if FF_API_LOWRES
// The decoder might reduce the video size by the lowres factor.
if
(
av_codec_get_lowres
(
st
->
internal
->
avctx
)
&&
orig_w
)
{
if
(
st
->
internal
->
avctx
->
lowres
&&
orig_w
)
{
st
->
codecpar
->
width
=
orig_w
;
st
->
codecpar
->
height
=
orig_h
;
}
#endif
}
#if FF_API_LAVF_AVCTX
...
...
@@ -4041,13 +4043,15 @@ FF_DISABLE_DEPRECATION_WARNINGS
if
(
ret
<
0
)
goto
find_stream_info_err
;
#if FF_API_LOWRES
// The old API (AVStream.codec) "requires" the resolution to be adjusted
// by the lowres factor.
if
(
av_codec_get_lowres
(
st
->
internal
->
avctx
)
&&
st
->
internal
->
avctx
->
width
)
{
av_codec_set_lowres
(
st
->
codec
,
av_codec_get_lowres
(
st
->
internal
->
avctx
))
;
if
(
st
->
internal
->
avctx
->
lowres
&&
st
->
internal
->
avctx
->
width
)
{
st
->
codec
->
lowres
=
st
->
internal
->
avctx
->
lowres
;
st
->
codec
->
width
=
st
->
internal
->
avctx
->
width
;
st
->
codec
->
height
=
st
->
internal
->
avctx
->
height
;
}
#endif
if
(
st
->
codec
->
codec_tag
!=
MKTAG
(
't'
,
'm'
,
'c'
,
'd'
))
{
st
->
codec
->
time_base
=
st
->
internal
->
avctx
->
time_base
;
...
...
@@ -4763,10 +4767,10 @@ void avpriv_set_pts_info(AVStream *s, int pts_wrap_bits,
s
->
time_base
=
new_tb
;
#if FF_API_LAVF_AVCTX
FF_DISABLE_DEPRECATION_WARNINGS
av_codec_set_pkt_timebase
(
s
->
codec
,
new_tb
)
;
s
->
codec
->
pkt_timebase
=
new_tb
;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
av_codec_set_pkt_timebase
(
s
->
internal
->
avctx
,
new_tb
)
;
s
->
internal
->
avctx
->
pkt_timebase
=
new_tb
;
s
->
pts_wrap_bits
=
pts_wrap_bits
;
}
...
...
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