Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: source/patched-ffmpeg-mt/tools/probetest.c

Issue 4533003: patched ffmpeg nov 2 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« README.chromium ('K') | « source/patched-ffmpeg-mt/tools/patcheck ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at> 2 * copyright (c) 2009 Michael Niedermayer <michaelni@gmx.at>
3 * 3 *
4 * This file is part of FFmpeg. 4 * This file is part of FFmpeg.
5 * 5 *
6 * FFmpeg is free software; you can redistribute it and/or 6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version. 9 * version 2.1 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 12 matching lines...) Expand all
23 #include "libavformat/avformat.h" 23 #include "libavformat/avformat.h"
24 #include "libavcodec/put_bits.h" 24 #include "libavcodec/put_bits.h"
25 #include "libavutil/lfg.h" 25 #include "libavutil/lfg.h"
26 26
27 static int score_array[1000]; //this must be larger than the number of formats 27 static int score_array[1000]; //this must be larger than the number of formats
28 static int failures = 0; 28 static int failures = 0;
29 29
30 static void probe(AVProbeData *pd, int type, int p, int size) 30 static void probe(AVProbeData *pd, int type, int p, int size)
31 { 31 {
32 int i = 0; 32 int i = 0;
33 AVInputFormat *fmt; 33 AVInputFormat *fmt = NULL;
34 34
35 for (fmt = first_iformat; fmt != NULL; fmt = fmt->next) { 35 while ((fmt = av_iformat_next(fmt))) {
36 if (fmt->flags & AVFMT_NOFILE) 36 if (fmt->flags & AVFMT_NOFILE)
37 continue; 37 continue;
38 if (fmt->read_probe) { 38 if (fmt->read_probe) {
39 int score = fmt->read_probe(pd); 39 int score = fmt->read_probe(pd);
40 if (score > score_array[i] && score > AVPROBE_SCORE_MAX / 4) { 40 if (score > score_array[i] && score > AVPROBE_SCORE_MAX / 4) {
41 score_array[i] = score; 41 score_array[i] = score;
42 fprintf(stderr, "Failure of %s probing code with score=%d type=% d p=%X size=%d\n", 42 fprintf(stderr, "Failure of %s probing code with score=%d type=% d p=%X size=%d\n",
43 fmt->name, score, type, p, size); 43 fmt->name, score, type, p, size);
44 failures++; 44 failures++;
45 } 45 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 } 112 }
113 flush_put_bits(&pb); 113 flush_put_bits(&pb);
114 probe(&pd, type, p, size); 114 probe(&pd, type, p, size);
115 } 115 }
116 } 116 }
117 } 117 }
118 } 118 }
119 return failures; 119 return failures;
120 } 120 }
OLDNEW
« README.chromium ('K') | « source/patched-ffmpeg-mt/tools/patcheck ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698