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
This commit is contained in:
Víctor Paesa
2006-07-13 21:13:49 +00:00
committed by Måns Rullgård
parent 2645e80f6d
commit 5894e1bbf2
4 changed files with 9 additions and 11 deletions

View File

@@ -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),