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
e61825d5
Commit
e61825d5
authored
Nov 13, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffplay: remove usage of AVCodecContext accessors
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
b2731bcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
ffplay.c
fftools/ffplay.c
+6
-6
No files found.
fftools/ffplay.c
View file @
e61825d5
...
@@ -609,7 +609,7 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
...
@@ -609,7 +609,7 @@ static int decoder_decode_frame(Decoder *d, AVFrame *frame, AVSubtitle *sub) {
if
(
ret
>=
0
)
{
if
(
ret
>=
0
)
{
AVRational
tb
=
(
AVRational
){
1
,
frame
->
sample_rate
};
AVRational
tb
=
(
AVRational
){
1
,
frame
->
sample_rate
};
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
)
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
)
frame
->
pts
=
av_rescale_q
(
frame
->
pts
,
av_codec_get_pkt_timebase
(
d
->
avctx
)
,
tb
);
frame
->
pts
=
av_rescale_q
(
frame
->
pts
,
d
->
avctx
->
pkt_timebase
,
tb
);
else
if
(
d
->
next_pts
!=
AV_NOPTS_VALUE
)
else
if
(
d
->
next_pts
!=
AV_NOPTS_VALUE
)
frame
->
pts
=
av_rescale_q
(
d
->
next_pts
,
d
->
next_pts_tb
,
tb
);
frame
->
pts
=
av_rescale_q
(
d
->
next_pts
,
d
->
next_pts_tb
,
tb
);
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
)
{
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
)
{
...
@@ -2563,7 +2563,7 @@ static int stream_component_open(VideoState *is, int stream_index)
...
@@ -2563,7 +2563,7 @@ static int stream_component_open(VideoState *is, int stream_index)
ret
=
avcodec_parameters_to_context
(
avctx
,
ic
->
streams
[
stream_index
]
->
codecpar
);
ret
=
avcodec_parameters_to_context
(
avctx
,
ic
->
streams
[
stream_index
]
->
codecpar
);
if
(
ret
<
0
)
if
(
ret
<
0
)
goto
fail
;
goto
fail
;
av
_codec_set_pkt_timebase
(
avctx
,
ic
->
streams
[
stream_index
]
->
time_base
)
;
av
ctx
->
pkt_timebase
=
ic
->
streams
[
stream_index
]
->
time_base
;
codec
=
avcodec_find_decoder
(
avctx
->
codec_id
);
codec
=
avcodec_find_decoder
(
avctx
->
codec_id
);
...
@@ -2584,12 +2584,12 @@ static int stream_component_open(VideoState *is, int stream_index)
...
@@ -2584,12 +2584,12 @@ static int stream_component_open(VideoState *is, int stream_index)
}
}
avctx
->
codec_id
=
codec
->
id
;
avctx
->
codec_id
=
codec
->
id
;
if
(
stream_lowres
>
av_codec_get_max_lowres
(
codec
))
{
if
(
stream_lowres
>
codec
->
max_lowres
)
{
av_log
(
avctx
,
AV_LOG_WARNING
,
"The maximum value for lowres supported by the decoder is %d
\n
"
,
av_log
(
avctx
,
AV_LOG_WARNING
,
"The maximum value for lowres supported by the decoder is %d
\n
"
,
av_codec_get_max_lowres
(
codec
)
);
codec
->
max_lowres
);
stream_lowres
=
av_codec_get_max_lowres
(
codec
)
;
stream_lowres
=
codec
->
max_lowres
;
}
}
av
_codec_set_lowres
(
avctx
,
stream_lowres
)
;
av
ctx
->
lowres
=
stream_lowres
;
if
(
fast
)
if
(
fast
)
avctx
->
flags2
|=
AV_CODEC_FLAG2_FAST
;
avctx
->
flags2
|=
AV_CODEC_FLAG2_FAST
;
...
...
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