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
8d9277c3
Commit
8d9277c3
authored
Nov 01, 2014
by
Thomas Volkert
Committed by
Michael Niedermayer
Nov 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/rtpdec_h261: code aligned to the HEVC code
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
46353759
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
rtpdec_h261.c
libavformat/rtpdec_h261.c
+5
-7
No files found.
libavformat/rtpdec_h261.c
View file @
8d9277c3
...
...
@@ -32,7 +32,7 @@ struct PayloadContext {
uint32_t
timestamp
;
};
static
PayloadContext
*
h261_new_context
(
void
)
static
av_cold
PayloadContext
*
h261_new_context
(
void
)
{
return
av_mallocz
(
sizeof
(
PayloadContext
));
}
...
...
@@ -45,7 +45,7 @@ static void h261_free_dyn_buffer(AVIOContext **dyn_buf)
*
dyn_buf
=
NULL
;
}
static
void
h261_free_context
(
PayloadContext
*
pl_ctx
)
static
av_cold
void
h261_free_context
(
PayloadContext
*
pl_ctx
)
{
/* return if context is invalid */
if
(
!
pl_ctx
)
...
...
@@ -80,16 +80,14 @@ int ff_h261_handle_packet(AVFormatContext *ctx, PayloadContext *data,
int
sbit
,
ebit
,
gobn
,
mbap
,
quant
;
int
res
;
//av_log(ctx, AV_LOG_DEBUG, "got h261 RTP packet with time: %u\n", timestamp);
/* drop data of previous packets in case of non-continuous (loss) packet stream */
if
(
data
->
buf
&&
data
->
timestamp
!=
*
timestamp
)
{
h261_free_dyn_buffer
(
&
data
->
buf
);
}
/* sanity check for size of input packet */
if
(
len
<
5
/* 4 bytes header and 1 byte payload at least */
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Too short
H.261 RTP packet
\n
"
);
/* sanity check for size of input packet
: 1 byte payload at least
*/
if
(
len
<
RTP_H261_PAYLOAD_HEADER_SIZE
+
1
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Too short
RTP/H.261 packet, got %d bytes
\n
"
,
len
);
return
AVERROR_INVALIDDATA
;
}
...
...
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