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
48666c2b
Commit
48666c2b
authored
May 04, 2012
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpdec_h264: Cleanup debug packet type counting
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
0b3ac9fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
rtpdec_h264.c
libavformat/rtpdec_h264.c
+9
-9
No files found.
libavformat/rtpdec_h264.c
View file @
48666c2b
...
...
@@ -57,6 +57,12 @@ struct PayloadContext {
#endif
};
#ifdef DEBUG
#define COUNT_NAL_TYPE(data, nal) data->packet_types_received[(nal) & 0x1f]++
#else
#define COUNT_NAL_TYPE(data, nal) do { } while (0)
#endif
static
int
sdp_parse_fmtp_config_h264
(
AVStream
*
stream
,
PayloadContext
*
h264_data
,
char
*
attr
,
char
*
value
)
...
...
@@ -188,9 +194,7 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data,
av_new_packet
(
pkt
,
len
+
sizeof
(
start_sequence
));
memcpy
(
pkt
->
data
,
start_sequence
,
sizeof
(
start_sequence
));
memcpy
(
pkt
->
data
+
sizeof
(
start_sequence
),
buf
,
len
);
#ifdef DEBUG
data
->
packet_types_received
[
nal
&
0x1f
]
++
;
#endif
COUNT_NAL_TYPE
(
data
,
nal
);
break
;
case
24
:
// STAP-A (one packet, multiple nals)
...
...
@@ -224,9 +228,7 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data,
memcpy
(
dst
,
start_sequence
,
sizeof
(
start_sequence
));
dst
+=
sizeof
(
start_sequence
);
memcpy
(
dst
,
src
,
nal_size
);
#ifdef DEBUG
data
->
packet_types_received
[
*
src
&
0x1f
]
++
;
#endif
COUNT_NAL_TYPE
(
data
,
*
src
);
dst
+=
nal_size
;
}
}
else
{
...
...
@@ -287,10 +289,8 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data,
buf
++
;
len
--
;
#ifdef DEBUG
if
(
start_bit
)
data
->
packet_types_received
[
nal_type
]
++
;
#endif
COUNT_NAL_TYPE
(
data
,
nal_type
);
if
(
start_bit
)
{
/* copy in the start sequence, and the reconstructed nal */
av_new_packet
(
pkt
,
sizeof
(
start_sequence
)
+
sizeof
(
nal
)
+
len
);
...
...
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