diff options
author | Peter Ross <pross@xvid.org> | 2010-12-26 01:24:51 +0000 |
---|---|---|
committer | Peter Ross <pross@xvid.org> | 2010-12-26 01:24:51 +0000 |
commit | 141de5a9c141ab82ff453d4e9bb27fd4e25da1ea (patch) | |
tree | 8dae98ce91223df6b498e801551aa88a7402d4be /libavformat/utils.c | |
parent | 456a70aeb826b7b84d30cc3cc279fa7c65fc7d4e (diff) | |
download | ffmpeg-141de5a9c141ab82ff453d4e9bb27fd4e25da1ea.tar.gz |
add ff_find_stream_index
Originally committed as revision 26092 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 61aa7d45e7..58e06e8688 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3806,3 +3806,12 @@ void ff_parse_key_value(const char *str, ff_parse_key_val_cb callback_get_buf, } } +int ff_find_stream_index(AVFormatContext *s, int id) +{ + int i; + for (i = 0; i < s->nb_streams; i++) { + if (s->streams[i]->id == id) + return i; + } + return -1; +} |