* This is free software; see GPL.txt
*/
#include <string.h>
-#include <avformat.h>
+#include <libavformat/avformat.h>
#include "input.h"
static uint64_t time_convert(uint64_t time, AVStream *st)
}
}
-AVFormatContext *open_input_stream(const char *fname, int w, int h, int fps)
+AVFormatContext *open_input_stream(const char *fname, int w, int h, int fps, const char *impform)
{
AVFormatContext *s;
AVInputFormat *fmt;
param.pix_fmt = PIX_FMT_YUV420P;
param.time_base.den = fps;
param.time_base.num = 1;
- fmt = av_find_input_format("video4linux2");
+ if(impform == NULL)
+ impform = "video4linux2";
+ fmt = av_find_input_format(impform);
res = av_open_input_file(&s, fname, fmt, 0, ¶m);
if (res < 0) {
fprintf(stderr, "Error opening %s: %d\n", fname, res);