Mercurial > libavformat.hg
comparison img.c @ 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 | d18cc9a1fd02 |
children | 185190bdc185 |
comparison
equal
deleted
inserted
replaced
1174:1c9ddfd961d6 | 1175:8b53c0f3e7ad |
---|---|
15 * You should have received a copy of the GNU Lesser General Public | 15 * You should have received a copy of the GNU Lesser General Public |
16 * License along with this library; if not, write to the Free Software | 16 * License along with this library; if not, write to the Free Software |
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
18 */ | 18 */ |
19 #include "avformat.h" | 19 #include "avformat.h" |
20 | |
21 /* XXX: this is a hack */ | |
22 int loop_input = 0; | |
23 | 20 |
24 typedef struct { | 21 typedef struct { |
25 int width; | 22 int width; |
26 int height; | 23 int height; |
27 int img_first; | 24 int img_first; |
198 int ret; | 195 int ret; |
199 ByteIOContext f1, *f; | 196 ByteIOContext f1, *f; |
200 | 197 |
201 if (!s->is_pipe) { | 198 if (!s->is_pipe) { |
202 /* loop over input */ | 199 /* loop over input */ |
203 if (loop_input && s->img_number > s->img_last) { | 200 if (s1->loop_input && s->img_number > s->img_last) { |
204 s->img_number = s->img_first; | 201 s->img_number = s->img_first; |
205 } | 202 } |
206 if (get_frame_filename(filename, sizeof(filename), | 203 if (get_frame_filename(filename, sizeof(filename), |
207 s->path, s->img_number) < 0) | 204 s->path, s->img_number) < 0) |
208 return AVERROR_IO; | 205 return AVERROR_IO; |