Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
90665d70
Commit
90665d70
authored
May 29, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* copy: low latency for subt.
TODO: move subtitle paquetizer to subsdec.c to convert all subs to
UTF-8
.
parent
fac21f4c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
5 deletions
+37
-5
modules/packetizer/copy.c
modules/packetizer/copy.c
+37
-5
No files found.
modules/packetizer/copy.c
View file @
90665d70
...
...
@@ -51,7 +51,8 @@ struct decoder_sys_t
block_t
*
p_block
;
};
static
block_t
*
Packetize
(
decoder_t
*
,
block_t
**
);
static
block_t
*
Packetize
(
decoder_t
*
,
block_t
**
);
static
block_t
*
PacketizeSub
(
decoder_t
*
,
block_t
**
);
/*****************************************************************************
* Open: probe the packetizer and return score
...
...
@@ -72,7 +73,10 @@ static int Open( vlc_object_t *p_this )
return
VLC_EGENERIC
;
}
p_dec
->
pf_packetize
=
Packetize
;
if
(
p_dec
->
fmt_in
.
i_cat
==
SPU_ES
)
p_dec
->
pf_packetize
=
PacketizeSub
;
else
p_dec
->
pf_packetize
=
Packetize
;
/* Create the output format */
es_format_Copy
(
&
p_dec
->
fmt_out
,
&
p_dec
->
fmt_in
);
...
...
@@ -241,7 +245,7 @@ static void Close( vlc_object_t *p_this )
}
/*****************************************************************************
* Packetize
Std
: packetize an unit (here copy a complete block )
* Packetize: packetize an unit (here copy a complete block )
*****************************************************************************/
static
block_t
*
Packetize
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
...
...
@@ -267,8 +271,7 @@ static block_t *Packetize ( decoder_t *p_dec, block_t **pp_block )
return
NULL
;
}
if
(
p_dec
->
fmt_in
.
i_cat
!=
SPU_ES
&&
p_ret
!=
NULL
&&
p_block
->
i_pts
>
p_ret
->
i_pts
)
if
(
p_ret
!=
NULL
&&
p_block
->
i_pts
>
p_ret
->
i_pts
)
{
p_ret
->
i_length
=
p_block
->
i_pts
-
p_ret
->
i_pts
;
}
...
...
@@ -276,3 +279,32 @@ static block_t *Packetize ( decoder_t *p_dec, block_t **pp_block )
return
p_ret
;
}
/*****************************************************************************
* PacketizeSub: packetize an unit (here copy a complete block )
*****************************************************************************/
static
block_t
*
PacketizeSub
(
decoder_t
*
p_dec
,
block_t
**
pp_block
)
{
block_t
*
p_block
;
if
(
pp_block
==
NULL
||
*
pp_block
==
NULL
)
{
return
NULL
;
}
p_block
=
*
pp_block
;
*
pp_block
=
NULL
;
if
(
p_block
->
i_dts
<=
0
)
{
p_block
->
i_dts
=
p_block
->
i_pts
;
}
if
(
p_block
->
i_dts
<=
0
)
{
msg_Dbg
(
p_dec
,
"need dts > 0"
);
block_Release
(
p_block
);
return
NULL
;
}
return
p_block
;
}
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