Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
5247c432
Commit
5247c432
authored
Feb 14, 2019
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/spdifenc: Do not overwrite buffer when muxing TrueHD.
Fixes ticket #7733. Tested-by: Moritz Barsnick
parent
801d78f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
spdifenc.c
libavformat/spdifenc.c
+7
-2
No files found.
libavformat/spdifenc.c
View file @
5247c432
...
@@ -422,8 +422,13 @@ static int spdif_header_truehd(AVFormatContext *s, AVPacket *pkt)
...
@@ -422,8 +422,13 @@ static int spdif_header_truehd(AVFormatContext *s, AVPacket *pkt)
memcpy
(
&
ctx
->
hd_buf
[
ctx
->
hd_buf_count
*
TRUEHD_FRAME_OFFSET
-
BURST_HEADER_SIZE
+
mat_code_length
],
memcpy
(
&
ctx
->
hd_buf
[
ctx
->
hd_buf_count
*
TRUEHD_FRAME_OFFSET
-
BURST_HEADER_SIZE
+
mat_code_length
],
pkt
->
data
,
pkt
->
size
);
pkt
->
data
,
pkt
->
size
);
memset
(
&
ctx
->
hd_buf
[
ctx
->
hd_buf_count
*
TRUEHD_FRAME_OFFSET
-
BURST_HEADER_SIZE
+
mat_code_length
+
pkt
->
size
],
if
(
ctx
->
hd_buf_count
<
23
)
{
0
,
TRUEHD_FRAME_OFFSET
-
pkt
->
size
-
mat_code_length
);
memset
(
&
ctx
->
hd_buf
[
ctx
->
hd_buf_count
*
TRUEHD_FRAME_OFFSET
-
BURST_HEADER_SIZE
+
mat_code_length
+
pkt
->
size
],
0
,
TRUEHD_FRAME_OFFSET
-
pkt
->
size
-
mat_code_length
);
}
else
{
size_t
padding
=
MAT_FRAME_SIZE
-
(
ctx
->
hd_buf_count
*
TRUEHD_FRAME_OFFSET
-
BURST_HEADER_SIZE
+
pkt
->
size
);
memset
(
&
ctx
->
hd_buf
[
MAT_FRAME_SIZE
-
padding
],
0
,
padding
);
}
if
(
++
ctx
->
hd_buf_count
<
24
){
if
(
++
ctx
->
hd_buf_count
<
24
){
ctx
->
pkt_offset
=
0
;
ctx
->
pkt_offset
=
0
;
...
...
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