# HG changeset patch # User mru # Date 1152825229 0 # Node ID 8b53c0f3e7ada8279dda3fef256ff3126fa1cc99 # Parent 1c9ddfd961d690944707728a0fb3881bf9bc2957 add loop_input to AVFormatContext, getting rid of old hack patch by Vctor Paesa diff -r 1c9ddfd961d6 -r 8b53c0f3e7ad avformat.h --- a/avformat.h Thu Jul 13 08:05:42 2006 +0000 +++ b/avformat.h Thu Jul 13 21:13:49 2006 +0000 @@ -5,8 +5,8 @@ extern "C" { #endif -#define LIBAVFORMAT_VERSION_INT ((50<<16)+(4<<8)+0) -#define LIBAVFORMAT_VERSION 50.4.0 +#define LIBAVFORMAT_VERSION_INT ((50<<16)+(5<<8)+0) +#define LIBAVFORMAT_VERSION 50.5.0 #define LIBAVFORMAT_BUILD LIBAVFORMAT_VERSION_INT #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) @@ -337,6 +337,8 @@ int flags; #define AVFMT_FLAG_GENPTS 0x0001 ///< generate pts if missing even if it requires parsing future frames + + int loop_input; } AVFormatContext; typedef struct AVPacketList { diff -r 1c9ddfd961d6 -r 8b53c0f3e7ad img.c --- a/img.c Thu Jul 13 08:05:42 2006 +0000 +++ b/img.c Thu Jul 13 21:13:49 2006 +0000 @@ -18,9 +18,6 @@ */ #include "avformat.h" -/* XXX: this is a hack */ -int loop_input = 0; - typedef struct { int width; int height; @@ -200,7 +197,7 @@ if (!s->is_pipe) { /* loop over input */ - if (loop_input && s->img_number > s->img_last) { + if (s1->loop_input && s->img_number > s->img_last) { s->img_number = s->img_first; } if (get_frame_filename(filename, sizeof(filename), diff -r 1c9ddfd961d6 -r 8b53c0f3e7ad img2.c --- a/img2.c Thu Jul 13 08:05:42 2006 +0000 +++ b/img2.c Thu Jul 13 21:13:49 2006 +0000 @@ -19,9 +19,6 @@ */ #include "avformat.h" -/* XXX: this is a hack */ -extern int loop_input; - typedef struct { int img_first; int img_last; @@ -236,7 +233,7 @@ if (!s->is_pipe) { /* loop over input */ - if (loop_input && s->img_number > s->img_last) { + if (s1->loop_input && s->img_number > s->img_last) { s->img_number = s->img_first; } if (get_frame_filename(filename, sizeof(filename),