Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
10e2d8b5
Commit
10e2d8b5
authored
Feb 19, 2015
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpdec_hevc: Use a shared function for parsing parameter sets
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
0de07510
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
35 deletions
+3
-35
rtpdec_hevc.c
libavformat/rtpdec_hevc.c
+3
-35
No files found.
libavformat/rtpdec_hevc.c
View file @
10e2d8b5
...
...
@@ -25,6 +25,7 @@
#include "avformat.h"
#include "rtpdec.h"
#include "rtpdec_formats.h"
#define RTP_HEVC_PAYLOAD_HEADER_SIZE 2
#define RTP_HEVC_FU_HEADER_SIZE 1
...
...
@@ -106,41 +107,8 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s,
size_ptr
=
&
hevc_data
->
sei_size
;
}
while
(
*
value
)
{
char
base64packet
[
1024
];
uint8_t
decoded_packet
[
1024
];
int
decoded_packet_size
;
char
*
dst
=
base64packet
;
while
(
*
value
&&
*
value
!=
','
&&
(
dst
-
base64packet
)
<
sizeof
(
base64packet
)
-
1
)
{
*
dst
++
=
*
value
++
;
}
*
dst
++
=
'\0'
;
if
(
*
value
==
','
)
value
++
;
decoded_packet_size
=
av_base64_decode
(
decoded_packet
,
base64packet
,
sizeof
(
decoded_packet
));
if
(
decoded_packet_size
>
0
)
{
uint8_t
*
tmp
=
av_realloc
(
*
data_ptr
,
decoded_packet_size
+
sizeof
(
start_sequence
)
+
*
size_ptr
);
if
(
!
tmp
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Unable to allocate memory for extradata!
\n
"
);
return
AVERROR
(
ENOMEM
);
}
*
data_ptr
=
tmp
;
memcpy
(
*
data_ptr
+
*
size_ptr
,
start_sequence
,
sizeof
(
start_sequence
));
memcpy
(
*
data_ptr
+
*
size_ptr
+
sizeof
(
start_sequence
),
decoded_packet
,
decoded_packet_size
);
*
size_ptr
+=
sizeof
(
start_sequence
)
+
decoded_packet_size
;
}
}
ff_h264_parse_sprop_parameter_sets
(
s
,
data_ptr
,
size_ptr
,
value
);
}
/* max-lsr, max-lps, max-cpb, max-dpb, max-br, max-tr, max-tc */
...
...
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