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
a9e48177
Commit
a9e48177
authored
Sep 09, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: use PTS from the AVSubtitle structure for sub2video.
parent
2939e258
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ffmpeg.c
ffmpeg.c
+3
-2
No files found.
ffmpeg.c
View file @
a9e48177
...
@@ -202,13 +202,14 @@ static void sub2video_push_ref(InputStream *ist, int64_t pts)
...
@@ -202,13 +202,14 @@ static void sub2video_push_ref(InputStream *ist, int64_t pts)
AV_BUFFERSRC_FLAG_PUSH
);
AV_BUFFERSRC_FLAG_PUSH
);
}
}
static
void
sub2video_update
(
InputStream
*
ist
,
AVSubtitle
*
sub
,
int64_t
pts
)
static
void
sub2video_update
(
InputStream
*
ist
,
AVSubtitle
*
sub
)
{
{
int
w
=
ist
->
sub2video
.
w
,
h
=
ist
->
sub2video
.
h
;
int
w
=
ist
->
sub2video
.
w
,
h
=
ist
->
sub2video
.
h
;
AVFilterBufferRef
*
ref
=
ist
->
sub2video
.
ref
;
AVFilterBufferRef
*
ref
=
ist
->
sub2video
.
ref
;
int8_t
*
dst
;
int8_t
*
dst
;
int
dst_linesize
;
int
dst_linesize
;
int
i
;
int
i
;
int64_t
pts
=
av_rescale_q
(
sub
->
pts
,
AV_TIME_BASE_Q
,
ist
->
st
->
time_base
);
if
(
!
ref
)
if
(
!
ref
)
return
;
return
;
...
@@ -1680,7 +1681,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
...
@@ -1680,7 +1681,7 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
FFSWAP
(
AVSubtitle
,
subtitle
,
ist
->
prev_sub
.
subtitle
);
FFSWAP
(
AVSubtitle
,
subtitle
,
ist
->
prev_sub
.
subtitle
);
}
}
sub2video_update
(
ist
,
&
subtitle
,
pkt
->
pts
);
sub2video_update
(
ist
,
&
subtitle
);
if
(
!*
got_output
||
!
subtitle
.
num_rects
)
if
(
!*
got_output
||
!
subtitle
.
num_rects
)
return
ret
;
return
ret
;
...
...
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