summaryrefslogtreecommitdiff
path: root/libavformat/gxf.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2010-12-26 01:24:51 +0000
committerPeter Ross <pross@xvid.org>2010-12-26 01:24:51 +0000
commit141de5a9c141ab82ff453d4e9bb27fd4e25da1ea (patch)
tree8dae98ce91223df6b498e801551aa88a7402d4be /libavformat/gxf.c
parent456a70aeb826b7b84d30cc3cc279fa7c65fc7d4e (diff)
add ff_find_stream_index
Originally committed as revision 26092 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/gxf.c')
-rw-r--r--libavformat/gxf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index af2ee9dea8..d37a1d80a2 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -21,6 +21,7 @@
#include "libavutil/common.h"
#include "avformat.h"
+#include "internal.h"
#include "gxf.h"
struct gxf_stream_info {
@@ -77,10 +78,9 @@ static int gxf_probe(AVProbeData *p) {
static int get_sindex(AVFormatContext *s, int id, int format) {
int i;
AVStream *st = NULL;
- for (i = 0; i < s->nb_streams; i++) {
- if (s->streams[i]->id == id)
- return i;
- }
+ i = ff_find_stream_index(s, id);
+ if (i >= 0)
+ return i;
st = av_new_stream(s, id);
if (!st)
return AVERROR(ENOMEM);