summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorVíctor Paesa <wzrlpy@arsystel.com>2006-07-13 21:13:49 +0000
committerMåns Rullgård <mans@mansr.com>2006-07-13 21:13:49 +0000
commit5894e1bbf2f4f32949633edd01fdc237eb3cca07 (patch)
tree3d35203b2720b6883837767ed128de946407e90c /libavformat
parent2645e80f6dac1c4b2697d8ff9b09f89bae205848 (diff)
add loop_input to AVFormatContext, getting rid of old hack
patch by Víctor Paesa <wzrlpy at arsystel com> Originally committed as revision 5729 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avformat.h6
-rw-r--r--libavformat/img.c5
-rw-r--r--libavformat/img2.c5
3 files changed, 6 insertions, 10 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 1eff031de6..df87339e8b 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -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 @@ typedef struct AVFormatContext {
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 --git a/libavformat/img.c b/libavformat/img.c
index 047113bb68..2d12e31d06 100644
--- a/libavformat/img.c
+++ b/libavformat/img.c
@@ -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 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
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 --git a/libavformat/img2.c b/libavformat/img2.c
index d3efc7a5b4..ef67132ca1 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -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 @@ static int img_read_packet(AVFormatContext *s1, AVPacket *pkt)
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),