mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-23 17:05:00 +08:00
avformat: make avformat_close_input() more tolerant.
The purpose of this commit is to make error management simpler and less error prone, just like av_free() which is safe with NULL.
This commit is contained in:
@@ -3252,8 +3252,14 @@ void av_close_input_file(AVFormatContext *s)
|
||||
|
||||
void avformat_close_input(AVFormatContext **ps)
|
||||
{
|
||||
AVFormatContext *s = *ps;
|
||||
AVIOContext *pb = s->pb;
|
||||
AVFormatContext *s;
|
||||
AVIOContext *pb;
|
||||
|
||||
if (!ps || !*ps)
|
||||
return;
|
||||
|
||||
s = *ps;
|
||||
pb = s->pb;
|
||||
|
||||
if ((s->iformat && s->iformat->flags & AVFMT_NOFILE) ||
|
||||
(s->flags & AVFMT_FLAG_CUSTOM_IO))
|
||||
|
Reference in New Issue
Block a user