diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2007-04-09 20:45:43 +0400 |
---|---|---|
committer | Aurelien Jacobs <aurel@gnuage.org> | 2007-04-09 20:45:43 +0400 |
commit | df06539a251d75c2358603c91b32d38d3e23458b (patch) | |
tree | 0ba82bf386cb8ad3c4e3e04394c245e81f848d0b /libavformat | |
parent | 67545b0ce68c24286200a57349aa5e6307e3f7ba (diff) |
move matroska_find_track_by_num() upper in the file
so that it can be used by other part of the code
Originally committed as revision 8695 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/matroska.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/libavformat/matroska.c b/libavformat/matroska.c index 04735995fe..f6b4c66a96 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -974,6 +974,21 @@ ebml_read_header (MatroskaDemuxContext *matroska, 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 @@ matroska_read_header (AVFormatContext *s, 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) { |