* Copyright (c) 2000, 2001, 2002 Fabrice Bellard.
* Copyright (c) 2004 Michael Niedermayer
*
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
*
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "avformat.h"
{ CODEC_ID_FFV1 , "ffv1-img"},
{ CODEC_ID_RAWVIDEO , "y"},
{ CODEC_ID_BMP , "bmp"},
+ { CODEC_ID_GIF , "gif"},
+ { CODEC_ID_TARGA , "tga"},
+ { CODEC_ID_TIFF , "tiff"},
+ { CODEC_ID_SGI , "sgi"},
{0, NULL}
};
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){
st = av_new_stream(s1, 0);
if (!st) {
- return -ENOMEM;
+ return AVERROR(ENOMEM);
}
pstrcpy(s->path, sizeof(s->path), s1->filename);
s->is_pipe = 0;
else{
s->is_pipe = 1;
- st->need_parsing= 1;
+ st->need_parsing = AVSTREAM_PARSE_FULL;
}
if (!ap->time_base.num) {