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
e4b0a770
Commit
e4b0a770
authored
Oct 30, 2013
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libavfilter/decimate: Add pts of first frame to all frames.
Fixes ticket #3019 Reviewed-by: Clément Bœsch
parent
fa6fa216
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
vf_decimate.c
libavfilter/vf_decimate.c
+8
-2
No files found.
libavfilter/vf_decimate.c
View file @
e4b0a770
...
...
@@ -43,6 +43,7 @@ typedef struct {
AVFrame
**
clean_src
;
///< frame queue for the clean source
int
got_frame
[
2
];
///< frame request flag for each input stream
double
ts_unit
;
///< timestamp units for the output frames
int64_t
start_pts
;
///< base for output timestamps
uint32_t
eof
;
///< bitmask for end of stream
int
hsub
,
vsub
;
///< chroma subsampling values
int
depth
;
...
...
@@ -210,11 +211,14 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
av_frame_free
(
&
dm
->
queue
[
i
].
frame
);
}
else
{
AVFrame
*
frame
=
dm
->
queue
[
i
].
frame
;
if
(
frame
->
pts
!=
AV_NOPTS_VALUE
&&
dm
->
start_pts
==
AV_NOPTS_VALUE
)
dm
->
start_pts
=
frame
->
pts
;
if
(
dm
->
ppsrc
)
{
av_frame_free
(
&
frame
);
frame
=
dm
->
clean_src
[
i
];
}
frame
->
pts
=
outlink
->
frame_count
*
dm
->
ts_unit
;
frame
->
pts
=
outlink
->
frame_count
*
dm
->
ts_unit
+
(
dm
->
start_pts
==
AV_NOPTS_VALUE
?
0
:
dm
->
start_pts
);
ret
=
ff_filter_frame
(
outlink
,
frame
);
if
(
ret
<
0
)
break
;
...
...
@@ -259,7 +263,7 @@ static int config_input(AVFilterLink *inlink)
static
av_cold
int
decimate_init
(
AVFilterContext
*
ctx
)
{
const
DecimateContext
*
dm
=
ctx
->
priv
;
DecimateContext
*
dm
=
ctx
->
priv
;
AVFilterPad
pad
=
{
.
name
=
av_strdup
(
"main"
),
.
type
=
AVMEDIA_TYPE_VIDEO
,
...
...
@@ -285,6 +289,8 @@ static av_cold int decimate_init(AVFilterContext *ctx)
return
AVERROR
(
EINVAL
);
}
dm
->
start_pts
=
AV_NOPTS_VALUE
;
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