History

Mark mutable static data const where appropriate.

Alex Converse committed 14 years ago

Commit b0f29db1 parent e48a70e18 files · +26 −26Browse files

Unified · Split

18 files
  1. avprobe.c +6 −6
  2. avserver.c +1 −1
  3. libavcodec/aacdec.c +1 −1
  4. libavcodec/libvpxenc.c +1 −1
  5. libavcodec/libxvid_rc.c +1 −1
  6. libavfilter/vf_boxblur.c +1 −1
  7. libavfilter/vf_crop.c +1 −1
  8. libavfilter/vf_drawtext.c +3 −3
  9. libavfilter/vf_lut.c +1 −1
  10. libavfilter/vf_overlay.c +1 −1
  11. libavfilter/vf_pad.c +1 −1
  12. libavfilter/vf_scale.c +1 −1
  13. libavfilter/vf_select.c +1 −1
  14. libavfilter/vf_setpts.c +1 −1
  15. libavfilter/vf_settb.c +1 −1
  16. libavfilter/vsrc_nullsrc.c +1 −1
  17. libavformat/matroskadec.c +1 −1
  18. libavutil/eval.c +2 −2
avprobe.c+6−6
@@ -48,13 +48,13 @@ static const OptionDef options[]; · 47 unmodified lines
48static const char *input_filename;48static const char *input_filename;
49static AVInputFormat *iformat = NULL;49static AVInputFormat *iformat = NULL;
50 50
51static const char *binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" };51static const char *const binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" };
52static const char *decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" };52static const char *const decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" };
53 53
54static const char *unit_second_str = "s" ;54static const char unit_second_str[] = "s" ;
55static const char *unit_hertz_str = "Hz" ;55static const char unit_hertz_str[] = "Hz" ;
56static const char *unit_byte_str = "byte" ;56static const char unit_byte_str[] = "byte" ;
57static const char *unit_bit_per_second_str = "bit/s";57static const char unit_bit_per_second_str[] = "bit/s";
58 58
59void exit_program(int ret)59void exit_program(int ret)
60{60{
avserver.c+1−1
@@ -1865,7 +1865,7 @@ static int http_parse_request(HTTPContext *c) · 1864 unmodified lines
1865 1865
1866static void fmt_bytecount(AVIOContext *pb, int64_t count)1866static void fmt_bytecount(AVIOContext *pb, int64_t count)
1867{1867{
1868 static const char *suffix = " kMGTP";1868 static const char suffix[] = " kMGTP";
1869 const char *s;1869 const char *s;
1870 1870
1871 for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++);1871 for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++);
libavcodec/aacdec.c+1−1
@@ -1015,7 +1015,7 @@ static int decode_scalefactors(AACContext *ac, float sf[120], GetBitContext *gb, · 1014 unmodified lines
1015 int offset[3] = { global_gain, global_gain - 90, 0 };1015 int offset[3] = { global_gain, global_gain - 90, 0 };
1016 int clipped_offset;1016 int clipped_offset;
1017 int noise_flag = 1;1017 int noise_flag = 1;
1018 static const char *sf_str[3] = { "Global gain", "Noise gain", "Intensity stereo position" };1018 static const char *const sf_str[3] = { "Global gain", "Noise gain", "Intensity stereo position" };
1019 for (g = 0; g < ics->num_window_groups; g++) {1019 for (g = 0; g < ics->num_window_groups; g++) {
1020 for (i = 0; i < ics->max_sfb;) {1020 for (i = 0; i < ics->max_sfb;) {
1021 int run_end = band_type_run_end[idx];1021 int run_end = band_type_run_end[idx];
libavcodec/libvpxenc.c+1−1
@@ -66,7 +66,7 @@ typedef struct VP8EncoderContext { · 65 unmodified lines
66} VP8Context;66} VP8Context;
67 67
68/** String mappings for enum vp8e_enc_control_id */68/** String mappings for enum vp8e_enc_control_id */
69static const char *ctlidstr[] = {69static const char *const ctlidstr[] = {
70 [VP8E_UPD_ENTROPY] = "VP8E_UPD_ENTROPY",70 [VP8E_UPD_ENTROPY] = "VP8E_UPD_ENTROPY",
71 [VP8E_UPD_REFERENCE] = "VP8E_UPD_REFERENCE",71 [VP8E_UPD_REFERENCE] = "VP8E_UPD_REFERENCE",
72 [VP8E_USE_REFERENCE] = "VP8E_USE_REFERENCE",72 [VP8E_USE_REFERENCE] = "VP8E_USE_REFERENCE",
libavcodec/libxvid_rc.c+1−1
@@ -47,7 +47,7 @@ int ff_xvid_rate_control_init(MpegEncContext *s){ · 46 unmodified lines
47 }47 }
48 48
49 for(i=0; i<s->rc_context.num_entries; i++){49 for(i=0; i<s->rc_context.num_entries; i++){
50 static const char *frame_types = " ipbs";50 static const char frame_types[] = " ipbs";
51 char tmp[256];51 char tmp[256];
52 RateControlEntry *rce;52 RateControlEntry *rce;
53 53
libavfilter/vf_boxblur.c+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30#include "libavutil/pixdesc.h"30#include "libavutil/pixdesc.h"
31#include "avfilter.h"31#include "avfilter.h"
32 32
33static const char *var_names[] = {33static const char *const var_names[] = {
34 "w",34 "w",
35 "h",35 "h",
36 "cw",36 "cw",
libavfilter/vf_crop.c+1−1
@@ -32,7 +32,7 @@ · 31 unmodified lines
32#include "libavutil/imgutils.h"32#include "libavutil/imgutils.h"
33#include "libavutil/mathematics.h"33#include "libavutil/mathematics.h"
34 34
35static const char *var_names[] = {35static const char *const var_names[] = {
36 "E",36 "E",
37 "PHI",37 "PHI",
38 "PI",38 "PI",
libavfilter/vf_drawtext.c+3−3
@@ -49,7 +49,7 @@ · 48 unmodified lines
49#include FT_FREETYPE_H49#include FT_FREETYPE_H
50#include FT_GLYPH_H50#include FT_GLYPH_H
51 51
52static const char *var_names[] = {52static const char *const var_names[] = {
53 "E",53 "E",
54 "PHI",54 "PHI",
55 "PI",55 "PI",
@@ -64,8 +64,8 @@ static const char *var_names[] = { · 8 unmodified lines
64 NULL64 NULL
65};65};
66 66
67static const char *fun2_names[] = {67static const char *const fun2_names[] = {
68 "rand",68 "rand"
69};69};
70 70
71static double drand(void *opaque, double min, double max)71static double drand(void *opaque, double min, double max)
libavfilter/vf_lut.c+1−1
@@ -31,7 +31,7 @@ · 30 unmodified lines
31#include "avfilter.h"31#include "avfilter.h"
32#include "internal.h"32#include "internal.h"
33 33
34static const char *var_names[] = {34static const char *const var_names[] = {
35 "E",35 "E",
36 "PHI",36 "PHI",
37 "PI",37 "PI",
libavfilter/vf_overlay.c+1−1
@@ -33,7 +33,7 @@ · 32 unmodified lines
33#include "libavutil/mathematics.h"33#include "libavutil/mathematics.h"
34#include "internal.h"34#include "internal.h"
35 35
36static const char *var_names[] = {36static const char *const var_names[] = {
37 "E",37 "E",
38 "PHI",38 "PHI",
39 "PI",39 "PI",
libavfilter/vf_pad.c+1−1
@@ -35,7 +35,7 @@ · 34 unmodified lines
35#include "libavutil/mathematics.h"35#include "libavutil/mathematics.h"
36#include "drawutils.h"36#include "drawutils.h"
37 37
38static const char *var_names[] = {38static const char *const var_names[] = {
39 "PI",39 "PI",
40 "PHI",40 "PHI",
41 "E",41 "E",
libavfilter/vf_scale.c+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30#include "libavutil/pixdesc.h"30#include "libavutil/pixdesc.h"
31#include "libswscale/swscale.h"31#include "libswscale/swscale.h"
32 32
33static const char *var_names[] = {33static const char *const var_names[] = {
34 "PI",34 "PI",
35 "PHI",35 "PHI",
36 "E",36 "E",
libavfilter/vf_select.c+1−1
@@ -28,7 +28,7 @@ · 27 unmodified lines
28#include "libavutil/mathematics.h"28#include "libavutil/mathematics.h"
29#include "avfilter.h"29#include "avfilter.h"
30 30
31static const char *var_names[] = {31static const char *const var_names[] = {
32 "E", ///< Euler number32 "E", ///< Euler number
33 "PHI", ///< golden ratio33 "PHI", ///< golden ratio
34 "PI", ///< greek pi34 "PI", ///< greek pi
libavfilter/vf_setpts.c+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30#include "libavutil/mathematics.h"30#include "libavutil/mathematics.h"
31#include "avfilter.h"31#include "avfilter.h"
32 32
33static const char *var_names[] = {33static const char *const var_names[] = {
34 "E", ///< Euler number34 "E", ///< Euler number
35 "INTERLACED", ///< tell if the current frame is interlaced35 "INTERLACED", ///< tell if the current frame is interlaced
36 "N", ///< frame number (starting at zero)36 "N", ///< frame number (starting at zero)
libavfilter/vf_settb.c+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30#include "avfilter.h"30#include "avfilter.h"
31#include "internal.h"31#include "internal.h"
32 32
33static const char *var_names[] = {33static const char *const var_names[] = {
34 "E",34 "E",
35 "PHI",35 "PHI",
36 "PI",36 "PI",
libavfilter/vsrc_nullsrc.c+1−1
@@ -27,7 +27,7 @@ · 26 unmodified lines
27#include "libavutil/parseutils.h"27#include "libavutil/parseutils.h"
28#include "avfilter.h"28#include "avfilter.h"
29 29
30static const char *var_names[] = {30static const char *const var_names[] = {
31 "E",31 "E",
32 "PHI",32 "PHI",
33 "PI",33 "PI",
libavformat/matroskadec.c+1−1
@@ -514,7 +514,7 @@ static EbmlSyntax matroska_clusters[] = { · 513 unmodified lines
514 { 0 }514 { 0 }
515};515};
516 516
517static const char *matroska_doctypes[] = { "matroska", "webm" };517static const char *const matroska_doctypes[] = { "matroska", "webm" };
518 518
519/*519/*
520 * Return: Whether we reached the end of a level in the hierarchy or not.520 * Return: Whether we reached the end of a level in the hierarchy or not.
libavutil/eval.c+2−2
@@ -543,13 +543,13 @@ int av_expr_parse_and_eval(double *d, const char *s, · 542 unmodified lines
543#undef printf543#undef printf
544#include <string.h>544#include <string.h>
545 545
546static double const_values[] = {546static const double const_values[] = {
547 M_PI,547 M_PI,
548 M_E,548 M_E,
549 0549 0
550};550};
551 551
552static const char *const_names[] = {552static const char *const const_names[] = {
553 "PI",553 "PI",
554 "E",554 "E",
555 0555 0

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t