Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
8ea251d3
Commit
8ea251d3
authored
Sep 01, 2004
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/stream_out/transcode.c: fixed fps and audio-sync options.
parent
e9c3dc58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+10
-6
No files found.
modules/stream_out/transcode.c
View file @
8ea251d3
...
...
@@ -549,7 +549,6 @@ struct sout_stream_id_t
/* Sync */
date_t
interpolated_pts
;
mtime_t
i_initial_pts
;
};
...
...
@@ -1211,6 +1210,8 @@ static int transcode_video_new( sout_stream_t *p_stream, sout_stream_id_t *id )
}
}
date_Set
(
&
id
->
interpolated_pts
,
0
);
return
VLC_SUCCESS
;
}
...
...
@@ -1376,12 +1377,10 @@ static int transcode_video_process( sout_stream_t *p_stream,
mtime_t
i_master_drift
=
p_sys
->
i_master_drift
;
mtime_t
i_pts
;
if
(
!
id
->
i_initial_pts
)
id
->
i_initial_pts
=
p_pic
->
date
;
if
(
!
i_master_drift
)
{
/* No audio track ? */
i_master_drift
=
id
->
i_initial_pts
;
p_sys
->
i_master_drift
=
i_master_drift
=
p_pic
->
date
;
}
i_pts
=
date_Get
(
&
id
->
interpolated_pts
)
+
1
;
...
...
@@ -1393,18 +1392,20 @@ static int transcode_video_process( sout_stream_t *p_stream,
if
(
i_video_drift
<
i_master_drift
-
50000
)
{
#if 0
msg_Dbg( p_stream, "dropping frame (%i)",
(int)(i_video_drift - i_master_drift) );
#endif
return
VLC_EGENERIC
;
}
else
if
(
i_video_drift
>
i_master_drift
+
50000
)
{
#if 0
msg_Dbg( p_stream, "adding frame (%i)",
(int)(i_video_drift - i_master_drift) );
#endif
i_duplicate
=
2
;
}
date_Increment
(
&
id
->
interpolated_pts
,
1
);
}
if
(
!
id
->
p_encoder
->
p_module
)
...
...
@@ -1607,6 +1608,9 @@ static int transcode_video_process( sout_stream_t *p_stream,
p_block
=
id
->
p_encoder
->
pf_encode_video
(
id
->
p_encoder
,
p_pic
);
block_ChainAppend
(
out
,
p_block
);
if
(
p_sys
->
b_audio_sync
)
date_Increment
(
&
id
->
interpolated_pts
,
1
);
if
(
p_sys
->
b_audio_sync
&&
i_duplicate
>
1
)
{
mtime_t
i_pts
=
date_Get
(
&
id
->
interpolated_pts
)
+
1
;
...
...
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