Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
external
ffmpeg
Commits
34871beb
Commit
34871beb
authored
Nov 01, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
matroskadec: do not use avpacket internals
parent
9221efef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
libavformat/matroskadec.c
libavformat/matroskadec.c
+8
-7
No files found.
libavformat/matroskadec.c
View file @
34871beb
...
...
@@ -1137,13 +1137,14 @@ static void matroska_fix_ass_packet(MatroskaDemuxContext *matroska,
static
int
matroska_merge_packets
(
AVPacket
*
out
,
AVPacket
*
in
)
{
void
*
newdata
=
av_realloc
(
out
->
data
,
out
->
size
+
in
->
size
);
if
(
!
newdata
)
return
AVERROR
(
ENOMEM
);
out
->
data
=
newdata
;
memcpy
(
out
->
data
+
out
->
size
,
in
->
data
,
in
->
size
);
out
->
size
+=
in
->
size
;
av_destruct_packet
(
in
);
int
old_size
=
out
->
size
;
int
ret
=
av_grow_packet
(
out
,
in
->
size
);
if
(
ret
<
0
)
return
ret
;
memcpy
(
out
->
data
+
old_size
,
in
->
data
,
in
->
size
);
av_free_packet
(
in
);
av_free
(
in
);
return
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