The purpose of this commit is to make error management simpler and less error prone, just like av_free() which is safe with NULL.
Unified · Split
| @@ -15,6 +15,9 @@ libavutil: 2012-10-22 · 14 unmodified lines | |||
| 15 | 15 | ||
| 16 | API changes, most recent first: | 16 | API changes, most recent first: |
| 17 | 17 | ||
| 18 | 2013-xx-xx - xxxxxxx - lavf 55.16.101 - avformat.h | ||
| 19 | avformat_close_input() argument can be NULL and point on NULL. | ||
| 20 | |||
| 18 | 2013-08-29 - e31db62 - lavf 55.15.100 - avformat.h | 21 | 2013-08-29 - e31db62 - lavf 55.15.100 - avformat.h |
| 19 | Add av_format_get_probe_score(). | 22 | Add av_format_get_probe_score(). |
| 20 | 23 | ||
| @@ -3252,8 +3252,14 @@ void av_close_input_file(AVFormatContext *s) · 3251 unmodified lines | |||
| 3252 | 3252 | ||
| 3253 | void avformat_close_input(AVFormatContext **ps) | 3253 | void avformat_close_input(AVFormatContext **ps) |
| 3254 | { | 3254 | { |
| 3255 | AVFormatContext *s = *ps; | 3255 | AVFormatContext *s; |
| 3256 | AVIOContext *pb = s->pb; | 3256 | AVIOContext *pb; |
| 3257 | |||
| 3258 | if (!ps || !*ps) | ||
| 3259 | return; | ||
| 3260 | |||
| 3261 | s = *ps; | ||
| 3262 | pb = s->pb; | ||
| 3257 | 3263 | ||
| 3258 | if ((s->iformat && s->iformat->flags & AVFMT_NOFILE) || | 3264 | if ((s->iformat && s->iformat->flags & AVFMT_NOFILE) || |
| 3259 | (s->flags & AVFMT_FLAG_CUSTOM_IO)) | 3265 | (s->flags & AVFMT_FLAG_CUSTOM_IO)) |
| @@ -31,7 +31,7 @@ · 30 unmodified lines | |||
| 31 | 31 | ||
| 32 | #define LIBAVFORMAT_VERSION_MAJOR 55 | 32 | #define LIBAVFORMAT_VERSION_MAJOR 55 |
| 33 | #define LIBAVFORMAT_VERSION_MINOR 16 | 33 | #define LIBAVFORMAT_VERSION_MINOR 16 |
| 34 | #define LIBAVFORMAT_VERSION_MICRO 100 | 34 | #define LIBAVFORMAT_VERSION_MICRO 101 |
| 35 | 35 | ||
| 36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ | 36 | #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ |
| 37 | LIBAVFORMAT_VERSION_MINOR, \ | 37 | LIBAVFORMAT_VERSION_MINOR, \ |