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
11de006b
Commit
11de006b
authored
May 03, 2016
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Combine deprecation guards where appropriate
Some code blocks use multiple bits of deprecated API.
parent
a6a750c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
v4l2.c
libavdevice/v4l2.c
+2
-2
mux.c
libavformat/mux.c
+6
-6
No files found.
libavdevice/v4l2.c
View file @
11de006b
...
...
@@ -853,7 +853,7 @@ static int v4l2_read_header(AVFormatContext *s1)
static
int
v4l2_read_packet
(
AVFormatContext
*
s1
,
AVPacket
*
pkt
)
{
#if FF_API_CODED_FRAME
#if FF_API_CODED_FRAME
&& FF_API_LAVF_AVCTX
FF_DISABLE_DEPRECATION_WARNINGS
struct
video_data
*
s
=
s1
->
priv_data
;
AVFrame
*
frame
=
s1
->
streams
[
0
]
->
codec
->
coded_frame
;
...
...
@@ -866,7 +866,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
return
res
;
}
#if FF_API_CODED_FRAME
#if FF_API_CODED_FRAME
&& FF_API_LAVF_AVCTX
FF_DISABLE_DEPRECATION_WARNINGS
if
(
frame
&&
s
->
interlaced
)
{
frame
->
interlaced_frame
=
1
;
...
...
libavformat/mux.c
View file @
11de006b
...
...
@@ -99,7 +99,7 @@ static int init_muxer(AVFormatContext *s, AVDictionary **options)
if
((
ret
=
av_opt_set_dict
(
s
,
&
tmp
))
<
0
)
goto
fail
;
#if FF_API_LAVF_BITEXACT
#if FF_API_LAVF_BITEXACT
&& FF_API_LAVF_AVCTX
FF_DISABLE_DEPRECATION_WARNINGS
if
(
s
->
nb_streams
&&
s
->
streams
[
0
]
->
codec
->
flags
&
AV_CODEC_FLAG_BITEXACT
)
s
->
flags
|=
AVFMT_FLAG_BITEXACT
;
...
...
@@ -117,7 +117,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
st
=
s
->
streams
[
i
];
par
=
st
->
codecpar
;
#if FF_API_LAVF_CODEC_TB
#if FF_API_LAVF_CODEC_TB
&& FF_API_LAVF_AVCTX
FF_DISABLE_DEPRECATION_WARNINGS
if
(
!
st
->
time_base
.
num
&&
st
->
codec
->
time_base
.
num
)
{
av_log
(
s
,
AV_LOG_WARNING
,
"Using AVStream.codec.time_base as a "
...
...
@@ -272,7 +272,7 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
return
0
;
}
#if FF_API_COMPUTE_PKT_FIELDS2
#if FF_API_COMPUTE_PKT_FIELDS2
&& FF_API_LAVF_AVCTX
FF_DISABLE_DEPRECATION_WARNINGS
//FIXME merge with compute_pkt_fields
static
int
compute_pkt_fields2
(
AVFormatContext
*
s
,
AVStream
*
st
,
AVPacket
*
pkt
)
...
...
@@ -417,7 +417,7 @@ static int prepare_input_packet(AVFormatContext *s, AVPacket *pkt)
if
(
ret
<
0
)
return
ret
;
#if !FF_API_COMPUTE_PKT_FIELDS2
#if !FF_API_COMPUTE_PKT_FIELDS2
&& FF_API_LAVF_AVCTX
/* sanitize the timestamps */
if
(
!
(
s
->
oformat
->
flags
&
AVFMT_NOTIMESTAMPS
))
{
AVStream
*
st
=
s
->
streams
[
pkt
->
stream_index
];
...
...
@@ -475,7 +475,7 @@ int av_write_frame(AVFormatContext *s, AVPacket *pkt)
return
1
;
}
#if FF_API_COMPUTE_PKT_FIELDS2
#if FF_API_COMPUTE_PKT_FIELDS2
&& FF_API_LAVF_AVCTX
ret
=
compute_pkt_fields2
(
s
,
s
->
streams
[
pkt
->
stream_index
],
pkt
);
if
(
ret
<
0
&&
!
(
s
->
oformat
->
flags
&
AVFMT_NOTIMESTAMPS
))
...
...
@@ -639,7 +639,7 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
goto
fail
;
if
(
pkt
)
{
#if FF_API_COMPUTE_PKT_FIELDS2
#if FF_API_COMPUTE_PKT_FIELDS2
&& FF_API_LAVF_AVCTX
AVStream
*
st
=
s
->
streams
[
pkt
->
stream_index
];
av_log
(
s
,
AV_LOG_TRACE
,
"av_interleaved_write_frame size:%d dts:%"
PRId64
" pts:%"
PRId64
"
\n
"
,
...
...
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