forked from FFmpeg/FFmpeg
avcodec: make avcodec_close() more tolerant.
See previous commit.
This commit is contained in:
parent
36cd017acd
commit
3e1f507f3e
3 changed files with 10 additions and 2 deletions
|
@ -15,6 +15,9 @@ libavutil: 2012-10-22
|
||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
|
2013-xx-xx - xxxxxxx - lavc 55.31.101 - avcodec.h
|
||||||
|
avcodec_close() argument can be NULL.
|
||||||
|
|
||||||
2013-xx-xx - xxxxxxx - lavf 55.16.101 - avformat.h
|
2013-xx-xx - xxxxxxx - lavf 55.16.101 - avformat.h
|
||||||
avformat_close_input() argument can be NULL and point on NULL.
|
avformat_close_input() argument can be NULL and point on NULL.
|
||||||
|
|
||||||
|
|
|
@ -2398,7 +2398,12 @@ av_cold int ff_codec_close_recursive(AVCodecContext *avctx)
|
||||||
|
|
||||||
av_cold int avcodec_close(AVCodecContext *avctx)
|
av_cold int avcodec_close(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
int ret = ff_lock_avcodec(avctx);
|
int ret;
|
||||||
|
|
||||||
|
if (!avctx)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
ret = ff_lock_avcodec(avctx);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#define LIBAVCODEC_VERSION_MAJOR 55
|
#define LIBAVCODEC_VERSION_MAJOR 55
|
||||||
#define LIBAVCODEC_VERSION_MINOR 31
|
#define LIBAVCODEC_VERSION_MINOR 31
|
||||||
#define LIBAVCODEC_VERSION_MICRO 100
|
#define LIBAVCODEC_VERSION_MICRO 101
|
||||||
|
|
||||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||||
LIBAVCODEC_VERSION_MINOR, \
|
LIBAVCODEC_VERSION_MINOR, \
|
||||||
|
|
Loading…
Add table
Reference in a new issue