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
1af77eb5
Commit
1af77eb5
authored
Jul 29, 2015
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
videotoolbox: don't try to parse Annex B if current stream is avcC
parent
254c6bb4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
modules/codec/videotoolbox.m
modules/codec/videotoolbox.m
+14
-7
No files found.
modules/codec/videotoolbox.m
View file @
1af77eb5
...
...
@@ -97,6 +97,7 @@ struct decoder_sys_t
size_t
codec_level
;
bool
b_started
;
bool
b_is_avcc
;
VTDecompressionSessionRef
session
;
CMVideoFormatDescriptionRef
videoFormatDescription
;
...
...
@@ -251,6 +252,7 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
if
(
p_block
==
NULL
)
{
int
buf_size
=
p_dec
->
fmt_in
.
i_extra
+
20
;
uint32_t
i_nal_size
=
0
;
size
=
p_dec
->
fmt_in
.
i_extra
;
p_buf
=
malloc
(
buf_size
);
...
...
@@ -262,13 +264,14 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
/* we need to convert the SPS and PPS units we received from the
* demuxer's avvC atom so we can process them further */
i
_ret
=
convert_sps_pps
(
p_dec
,
i
f
(
convert_sps_pps
(
p_dec
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
,
p_buf
,
buf_size
,
&
size
,
NULL
);
&
i_nal_size
)
==
VLC_SUCCESS
)
p_sys
->
b_is_avcc
=
i_nal_size
>
0
;
}
else
{
/* we are mid-stream, let's have the h264_get helper see if it
* can find a NAL unit */
...
...
@@ -605,6 +608,7 @@ static int OpenDecoder(vlc_object_t *p_this)
return
VLC_ENOMEM
;
p_dec
->
p_sys
=
p_sys
;
p_sys
->
b_started
=
false
;
p_sys
->
b_is_avcc
=
false
;
p_sys
->
codec
=
codec
;
int
i_ret
=
StartVideoToolbox
(
p_dec
,
NULL
);
...
...
@@ -720,6 +724,9 @@ static bool H264ProcessBlock(decoder_t *p_dec, block_t *p_block)
if
(
!
p_block
->
p_buffer
)
return
false
;
if
(
p_sys
->
b_is_avcc
)
return
true
;
int
buf_size
=
p_dec
->
fmt_in
.
i_extra
+
20
;
uint32_t
size
=
p_dec
->
fmt_in
.
i_extra
;
uint8_t
*
p_sps_buf
=
NULL
,
*
p_pps_buf
=
NULL
;
...
...
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