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
65b83ce0
Commit
65b83ce0
authored
Jan 18, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/rmdec: Check the return value of av_get_packet()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8d7ce5cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
rmdec.c
libavformat/rmdec.c
+11
-6
No files found.
libavformat/rmdec.c
View file @
65b83ce0
...
@@ -896,11 +896,14 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
...
@@ -896,11 +896,14 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
}
else
}
else
return
-
1
;
return
-
1
;
}
else
{
}
else
{
av_get_packet
(
pb
,
pkt
,
len
);
if
((
ret
=
av_get_packet
(
pb
,
pkt
,
len
))
<
0
)
return
ret
;
rm_ac3_swap_bytes
(
st
,
pkt
);
rm_ac3_swap_bytes
(
st
,
pkt
);
}
}
}
else
}
else
{
av_get_packet
(
pb
,
pkt
,
len
);
if
((
ret
=
av_get_packet
(
pb
,
pkt
,
len
))
<
0
)
return
ret
;
}
pkt
->
stream_index
=
st
->
index
;
pkt
->
stream_index
=
st
->
index
;
...
@@ -933,9 +936,11 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
...
@@ -933,9 +936,11 @@ ff_rm_retrieve_cache (AVFormatContext *s, AVIOContext *pb,
av_assert0
(
rm
->
audio_pkt_cnt
>
0
);
av_assert0
(
rm
->
audio_pkt_cnt
>
0
);
if
(
ast
->
deint_id
==
DEINT_ID_VBRF
||
if
(
ast
->
deint_id
==
DEINT_ID_VBRF
||
ast
->
deint_id
==
DEINT_ID_VBRS
)
ast
->
deint_id
==
DEINT_ID_VBRS
)
{
av_get_packet
(
pb
,
pkt
,
ast
->
sub_packet_lengths
[
ast
->
sub_packet_cnt
-
rm
->
audio_pkt_cnt
]);
int
ret
=
av_get_packet
(
pb
,
pkt
,
ast
->
sub_packet_lengths
[
ast
->
sub_packet_cnt
-
rm
->
audio_pkt_cnt
]);
else
{
if
(
ret
<
0
)
return
ret
;
}
else
{
int
ret
=
av_new_packet
(
pkt
,
st
->
codec
->
block_align
);
int
ret
=
av_new_packet
(
pkt
,
st
->
codec
->
block_align
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
...
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