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
8d7ce5cd
Commit
8d7ce5cd
authored
Jan 18, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/nsvdec: Check the return value of av_get_packet()
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
eba5cb20
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
nsvdec.c
libavformat/nsvdec.c
+3
-2
No files found.
libavformat/nsvdec.c
View file @
8d7ce5cd
...
@@ -539,6 +539,7 @@ static int nsv_read_chunk(AVFormatContext *s, int fill_header)
...
@@ -539,6 +539,7 @@ static int nsv_read_chunk(AVFormatContext *s, int fill_header)
uint32_t
vsize
;
uint32_t
vsize
;
uint16_t
asize
;
uint16_t
asize
;
uint16_t
auxsize
;
uint16_t
auxsize
;
int
ret
;
av_dlog
(
s
,
"%s(%d)
\n
"
,
__FUNCTION__
,
fill_header
);
av_dlog
(
s
,
"%s(%d)
\n
"
,
__FUNCTION__
,
fill_header
);
...
@@ -595,7 +596,6 @@ null_chunk_retry:
...
@@ -595,7 +596,6 @@ null_chunk_retry:
st
[
s
->
streams
[
1
]
->
id
]
=
s
->
streams
[
1
];
st
[
s
->
streams
[
1
]
->
id
]
=
s
->
streams
[
1
];
if
(
vsize
&&
st
[
NSV_ST_VIDEO
])
{
if
(
vsize
&&
st
[
NSV_ST_VIDEO
])
{
int
ret
;
nst
=
st
[
NSV_ST_VIDEO
]
->
priv_data
;
nst
=
st
[
NSV_ST_VIDEO
]
->
priv_data
;
pkt
=
&
nsv
->
ahead
[
NSV_ST_VIDEO
];
pkt
=
&
nsv
->
ahead
[
NSV_ST_VIDEO
];
if
((
ret
=
av_get_packet
(
pb
,
pkt
,
vsize
))
<
0
)
if
((
ret
=
av_get_packet
(
pb
,
pkt
,
vsize
))
<
0
)
...
@@ -641,7 +641,8 @@ null_chunk_retry:
...
@@ -641,7 +641,8 @@ null_chunk_retry:
av_dlog
(
s
,
"NSV RAWAUDIO: bps %d, nchan %d, srate %d
\n
"
,
bps
,
channels
,
samplerate
);
av_dlog
(
s
,
"NSV RAWAUDIO: bps %d, nchan %d, srate %d
\n
"
,
bps
,
channels
,
samplerate
);
}
}
}
}
av_get_packet
(
pb
,
pkt
,
asize
);
if
((
ret
=
av_get_packet
(
pb
,
pkt
,
asize
))
<
0
)
return
ret
;
pkt
->
stream_index
=
st
[
NSV_ST_AUDIO
]
->
index
;
//NSV_ST_AUDIO;
pkt
->
stream_index
=
st
[
NSV_ST_AUDIO
]
->
index
;
//NSV_ST_AUDIO;
pkt
->
flags
|=
nsv
->
state
==
NSV_HAS_READ_NSVS
?
AV_PKT_FLAG_KEY
:
0
;
/* keyframe only likely on a sync frame */
pkt
->
flags
|=
nsv
->
state
==
NSV_HAS_READ_NSVS
?
AV_PKT_FLAG_KEY
:
0
;
/* keyframe only likely on a sync frame */
if
(
nsv
->
state
==
NSV_HAS_READ_NSVS
&&
st
[
NSV_ST_VIDEO
]
)
{
if
(
nsv
->
state
==
NSV_HAS_READ_NSVS
&&
st
[
NSV_ST_VIDEO
]
)
{
...
...
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