Mercurial > libavformat.hg
comparison matroska.c @ 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 |
comparison
equal
deleted
inserted
replaced
2010:7190252e8ad0 | 2011:84abfba4f3bf |
---|---|
971 } | 971 } |
972 } | 972 } |
973 | 973 |
974 return 0; | 974 return 0; |
975 } | 975 } |
976 | |
977 | |
978 static int | |
979 matroska_find_track_by_num (MatroskaDemuxContext *matroska, | |
980 int num) | |
981 { | |
982 int i; | |
983 | |
984 for (i = 0; i < matroska->num_tracks; i++) | |
985 if (matroska->tracks[i]->num == num) | |
986 return i; | |
987 | |
988 return -1; | |
989 } | |
990 | |
976 | 991 |
977 /* | 992 /* |
978 * Put one packet in an application-supplied AVPacket struct. | 993 * Put one packet in an application-supplied AVPacket struct. |
979 * Returns 0 on success or -1 on failure. | 994 * Returns 0 on success or -1 on failure. |
980 */ | 995 */ |
2350 } | 2365 } |
2351 res = 0; | 2366 res = 0; |
2352 } | 2367 } |
2353 | 2368 |
2354 return res; | 2369 return res; |
2355 } | |
2356 | |
2357 static int | |
2358 matroska_find_track_by_num (MatroskaDemuxContext *matroska, | |
2359 int num) | |
2360 { | |
2361 int i; | |
2362 | |
2363 for (i = 0; i < matroska->num_tracks; i++) | |
2364 if (matroska->tracks[i]->num == num) | |
2365 return i; | |
2366 | |
2367 return -1; | |
2368 } | 2370 } |
2369 | 2371 |
2370 static inline int | 2372 static inline int |
2371 rv_offset(uint8_t *data, int slice, int slices) | 2373 rv_offset(uint8_t *data, int slice, int slices) |
2372 { | 2374 { |