diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-03-18 17:22:23 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-03-18 17:22:23 +0000 |
commit | a05c8d7177857c8a78144cbccc512c282065195a (patch) | |
tree | ec0abaadaa0b145b37324eac5c79a9d9fb35b954 /libavformat/utils.c | |
parent | c5a9ab69c26c6c3c567195c748671677d36a908f (diff) | |
download | ffmpeg-a05c8d7177857c8a78144cbccc512c282065195a.tar.gz |
merging a small amount of the changes from BroadQ, the rest is either not clean / doesnt apply / or is PS2 specific (someone with a PS2 should merge/send a patch for the later)
Originally committed as revision 1690 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 1c1c406606..46dc4ea21c 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -355,7 +355,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, /* if still no format found, error */ if (!fmt) { err = AVERROR_NOFMT; - goto fail; + goto fail1; } /* XXX: suppress this hack for redirectors */ @@ -383,7 +383,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, ic->priv_data = av_mallocz(fmt->priv_data_size); if (!ic->priv_data) { err = AVERROR_NOMEM; - goto fail; + goto fail1; } } else ic->priv_data = NULL; @@ -397,7 +397,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, *ic_ptr = ic; return 0; fail1: - if (!(fmt->flags & AVFMT_NOFILE)) { + if (!fmt || !(fmt->flags & AVFMT_NOFILE)) { url_fclose(&ic->pb); } fail: |