diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 01:18:24 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 01:18:24 +0200 |
commit | fb09531720a4aa2dfa97e5a9a246a453b6278fd2 (patch) | |
tree | 61525c3a8ddb419d3838a26e488fc3659079bbcd /contrib/ffmpeg/libavformat/img2.c | |
parent | 294d01046724e28b7193bcb65bf2a0391b0135b6 (diff) | |
download | xine-lib-fb09531720a4aa2dfa97e5a9a246a453b6278fd2.tar.gz xine-lib-fb09531720a4aa2dfa97e5a9a246a453b6278fd2.tar.bz2 |
Sync with a more recent version of FFmpeg.
Diffstat (limited to 'contrib/ffmpeg/libavformat/img2.c')
-rw-r--r-- | contrib/ffmpeg/libavformat/img2.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/ffmpeg/libavformat/img2.c b/contrib/ffmpeg/libavformat/img2.c index 303190ad2..fa67ee742 100644 --- a/contrib/ffmpeg/libavformat/img2.c +++ b/contrib/ffmpeg/libavformat/img2.c @@ -154,10 +154,13 @@ static int find_image_range(int *pfirst_index, int *plast_index, static int image_probe(AVProbeData *p) { - if (av_filename_number_test(p->filename) && av_str2id(img_tags, p->filename)) - return AVPROBE_SCORE_MAX; - else - return 0; + if (p->filename && av_str2id(img_tags, p->filename)) { + if (av_filename_number_test(p->filename)) + return AVPROBE_SCORE_MAX; + else + return AVPROBE_SCORE_MAX/2; + } + return 0; } enum CodecID av_guess_image2_codec(const char *filename){ @@ -174,7 +177,7 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap) st = av_new_stream(s1, 0); if (!st) { - return -ENOMEM; + return AVERROR(ENOMEM); } pstrcpy(s->path, sizeof(s->path), s1->filename); |