mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avformat/allformats: test pointer to be used
Two tests check the opposite pointer before using it. If only one of these is set to a valid pointer, one of these functions will crash, the other will ignore the pointer. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
88519be8db
commit
ca21cb1e36
1 changed files with 2 additions and 2 deletions
|
|
@ -541,7 +541,7 @@ const AVOutputFormat *av_muxer_iterate(void **opaque)
|
|||
|
||||
if (i < size) {
|
||||
f = muxer_list[i];
|
||||
} else if (indev_list) {
|
||||
} else if (outdev_list) {
|
||||
f = outdev_list[i - size];
|
||||
}
|
||||
|
||||
|
|
@ -558,7 +558,7 @@ const AVInputFormat *av_demuxer_iterate(void **opaque)
|
|||
|
||||
if (i < size) {
|
||||
f = demuxer_list[i];
|
||||
} else if (outdev_list) {
|
||||
} else if (indev_list) {
|
||||
f = indev_list[i - size];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue