mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-24 03:39:45 +00: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:
parent
bc68927a0f
commit
36cd017acd
@ -15,6 +15,9 @@ libavutil: 2012-10-22
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2013-xx-xx - xxxxxxx - lavf 55.16.101 - avformat.h
|
||||
avformat_close_input() argument can be NULL and point on NULL.
|
||||
|
||||
2013-08-29 - e31db62 - lavf 55.15.100 - avformat.h
|
||||
Add av_format_get_probe_score().
|
||||
|
||||
|
@ -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))
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 55
|
||||
#define LIBAVFORMAT_VERSION_MINOR 16
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
#define LIBAVFORMAT_VERSION_MICRO 101
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
LIBAVFORMAT_VERSION_MINOR, \
|
||||
|
Loading…
Reference in New Issue
Block a user