Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
553ed228
Commit
553ed228
authored
Apr 28, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed syntax for VC1 coming from some ASF (packetizer).
The sequence header/entry point are not repeated yet.
parent
43d9cf9d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
modules/packetizer/vc1.c
modules/packetizer/vc1.c
+33
-1
No files found.
modules/packetizer/vc1.c
View file @
553ed228
...
...
@@ -89,6 +89,7 @@ struct decoder_sys_t
mtime_t
i_interpolated_dts
;
bool
b_check_startcode
;
};
typedef
enum
...
...
@@ -151,6 +152,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
pp_last
=
&
p_sys
->
p_frame
;
p_sys
->
i_interpolated_dts
=
-
1
;
p_sys
->
b_check_startcode
=
p_dec
->
fmt_in
.
b_packetized
;
if
(
p_dec
->
fmt_out
.
i_extra
>
0
)
{
...
...
@@ -193,7 +195,37 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
return
packetizer_Packetize
(
&
p_sys
->
packetizer
,
pp_block
);
if
(
p_sys
->
b_check_startcode
&&
pp_block
&&
*
pp_block
)
{
/* Fix syntax for (some?) VC1 from asf */
const
int
i_startcode
=
sizeof
(
p_vc1_startcode
);
block_t
*
p_block
=
*
pp_block
;
if
(
p_block
->
i_buffer
>
0
&&
(
p_block
->
i_buffer
<
i_startcode
||
memcmp
(
p_block
->
p_buffer
,
p_vc1_startcode
,
i_startcode
)
)
)
{
*
pp_block
=
p_block
=
block_Realloc
(
p_block
,
i_startcode
+
1
,
p_block
->
i_buffer
);
if
(
p_block
)
{
memcpy
(
p_block
->
p_buffer
,
p_vc1_startcode
,
i_startcode
);
if
(
p_sys
->
b_sequence_header
&&
p_sys
->
sh
.
b_interlaced
&&
p_block
->
i_buffer
>
i_startcode
+
1
&&
(
p_block
->
p_buffer
[
i_startcode
+
1
]
&
0xc0
)
==
0xc0
)
p_block
->
p_buffer
[
i_startcode
]
=
IDU_TYPE_FIELD
;
else
p_block
->
p_buffer
[
i_startcode
]
=
IDU_TYPE_FRAME
;
}
}
p_sys
->
b_check_startcode
=
false
;
}
block_t
*
p_au
=
packetizer_Packetize
(
&
p_sys
->
packetizer
,
pp_block
);
if
(
!
p_au
)
p_sys
->
b_check_startcode
=
p_dec
->
fmt_in
.
b_packetized
;
return
p_au
;
}
static
void
PacketizeReset
(
void
*
p_private
,
bool
b_broken
)
...
...
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