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
5a571d32
Commit
5a571d32
authored
May 04, 2012
by
Martin Storsjö
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtpdec_h264: Remove useless memory corruption checks
Signed-off-by:
Martin Storsjö
<
martin@martin.st
>
parent
b7b7354c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
23 deletions
+1
-23
rtpdec_h264.c
libavformat/rtpdec_h264.c
+1
-23
No files found.
libavformat/rtpdec_h264.c
View file @
5a571d32
...
...
@@ -53,8 +53,6 @@
RTP/H264 specific private data.
*/
struct
PayloadContext
{
unsigned
long
cookie
;
///< sanity check, to make sure we get the pointer we're expecting.
//sdp setup parameters
uint8_t
profile_idc
;
///< from the sdp setup parameters.
uint8_t
profile_iop
;
///< from the sdp setup parameters.
...
...
@@ -65,9 +63,6 @@ struct PayloadContext {
#endif
};
#define MAGIC_COOKIE (0xdeadbeef) ///< Cookie for the extradata; to verify we are what we think we are, and that we haven't been freed.
#define DEAD_COOKIE (0xdeaddead) ///< Cookie for the extradata; once it is freed.
/* ---------------- private code */
static
int
sdp_parse_fmtp_config_h264
(
AVStream
*
stream
,
PayloadContext
*
h264_data
,
...
...
@@ -187,7 +182,6 @@ static int h264_handle_packet(AVFormatContext *ctx,
#ifdef DEBUG
assert
(
data
);
assert
(
data
->
cookie
==
MAGIC_COOKIE
);
#endif
assert
(
buf
);
...
...
@@ -331,15 +325,7 @@ static int h264_handle_packet(AVFormatContext *ctx,
/* ---------------- public code */
static
PayloadContext
*
h264_new_context
(
void
)
{
PayloadContext
*
data
=
av_mallocz
(
sizeof
(
PayloadContext
)
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
data
)
{
data
->
cookie
=
MAGIC_COOKIE
;
}
return
data
;
return
av_mallocz
(
sizeof
(
PayloadContext
)
+
FF_INPUT_BUFFER_PADDING_SIZE
);
}
static
void
h264_free_context
(
PayloadContext
*
data
)
...
...
@@ -354,13 +340,6 @@ static void h264_free_context(PayloadContext *data)
}
#endif
assert
(
data
);
assert
(
data
->
cookie
==
MAGIC_COOKIE
);
// avoid stale pointers (assert)
data
->
cookie
=
DEAD_COOKIE
;
// and clear out this...
av_free
(
data
);
}
...
...
@@ -376,7 +355,6 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index,
stream
=
s
->
streams
[
st_index
];
codec
=
stream
->
codec
;
assert
(
h264_data
->
cookie
==
MAGIC_COOKIE
);
if
(
av_strstart
(
p
,
"framesize:"
,
&
p
))
{
char
buf1
[
50
];
...
...
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