changeset 1175:8b53c0f3e7ad libavformat

add loop_input to AVFormatContext, getting rid of old hack patch by Vctor Paesa <wzrlpy at arsystel com>
author mru
date Thu, 13 Jul 2006 21:13:49 +0000
parents 1c9ddfd961d6
children bfea7dcd2698
files avformat.h img.c img2.c
diffstat 3 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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 {
--- 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),
--- 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),