Mercurial > libavformat.hg
changeset 2011:84abfba4f3bf libavformat
move matroska_find_track_by_num() upper in the file
so that it can be used by other part of the code
author | aurel |
---|---|
date | Mon, 09 Apr 2007 16:45:43 +0000 |
parents | 7190252e8ad0 |
children | 0829642f7456 |
files | matroska.c |
diffstat | 1 files changed, 15 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/matroska.c Mon Apr 09 16:29:10 2007 +0000 +++ b/matroska.c Mon Apr 09 16:45:43 2007 +0000 @@ -974,6 +974,21 @@ return 0; } + +static int +matroska_find_track_by_num (MatroskaDemuxContext *matroska, + int num) +{ + int i; + + for (i = 0; i < matroska->num_tracks; i++) + if (matroska->tracks[i]->num == num) + return i; + + return -1; +} + + /* * Put one packet in an application-supplied AVPacket struct. * Returns 0 on success or -1 on failure. @@ -2354,19 +2369,6 @@ return res; } -static int -matroska_find_track_by_num (MatroskaDemuxContext *matroska, - int num) -{ - int i; - - for (i = 0; i < matroska->num_tracks; i++) - if (matroska->tracks[i]->num == num) - return i; - - return -1; -} - static inline int rv_offset(uint8_t *data, int slice, int slices) {