Browse code

Merge commit '7abd35a1ffaecfd79fa07b801621ee11ab595c43'

* commit '7abd35a1ffaecfd79fa07b801621ee11ab595c43':
avformat: Add av_cold attributes to init functions missing them

Conflicts:
libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2013/05/06 17:19:56
Showing 10 changed files
... ...
@@ -24,13 +24,14 @@
24 24
  * G.723.1 demuxer
25 25
  */
26 26
 
27
+#include "libavutil/attributes.h"
27 28
 #include "libavutil/channel_layout.h"
28 29
 #include "avformat.h"
29 30
 #include "internal.h"
30 31
 
31 32
 static const uint8_t frame_size[4] = { 24, 20, 4, 1 };
32 33
 
33
-static int g723_1_init(AVFormatContext *s)
34
+static av_cold int g723_1_init(AVFormatContext *s)
34 35
 {
35 36
     AVStream *st;
36 37
 
... ...
@@ -19,6 +19,7 @@
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 
22
+#include "libavutil/attributes.h"
22 23
 #include "libavutil/fifo.h"
23 24
 #include "libavutil/log.h"
24 25
 #include "libavutil/mathematics.h"
... ...
@@ -293,7 +294,7 @@ static int get_system_header_size(AVFormatContext *ctx)
293 293
     return buf_index;
294 294
 }
295 295
 
296
-static int mpeg_mux_init(AVFormatContext *ctx)
296
+static av_cold int mpeg_mux_init(AVFormatContext *ctx)
297 297
 {
298 298
     MpegMuxContext *s = ctx->priv_data;
299 299
     int bitrate, i, mpa_id, mpv_id, mps_id, ac3_id, dts_id, lpcm_id, j;
... ...
@@ -18,11 +18,13 @@
18 18
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 19
  */
20 20
 
21
+#include "libavutil/attributes.h"
21 22
 #include "avformat.h"
22 23
 #include "rtpdec_formats.h"
23 24
 
24 25
 #define RTP_G726_HANDLER(bitrate) \
25
-static int g726_ ## bitrate ##_init(AVFormatContext *s, int st_index, PayloadContext *data) \
26
+static av_cold int g726_ ## bitrate ##_init(AVFormatContext *s, int st_index, \
27
+                                            PayloadContext *data) \
26 28
 { \
27 29
     AVStream *stream = s->streams[st_index]; \
28 30
     AVCodecContext *codec = stream->codec; \
... ...
@@ -21,9 +21,11 @@
21 21
 
22 22
 #include "avformat.h"
23 23
 #include "rtpdec_formats.h"
24
+#include "libavutil/attributes.h"
24 25
 #include "libavutil/intreadwrite.h"
25 26
 
26
-static int h263_init(AVFormatContext *ctx, int st_index, PayloadContext *data)
27
+static av_cold int h263_init(AVFormatContext *ctx, int st_index,
28
+                             PayloadContext *data)
27 29
 {
28 30
     if (st_index < 0)
29 31
         return 0;
... ...
@@ -27,6 +27,7 @@
27 27
 
28 28
 #include "avformat.h"
29 29
 #include "rtpdec_formats.h"
30
+#include "libavutil/attributes.h"
30 31
 #include "libavutil/intreadwrite.h"
31 32
 #include "libavcodec/get_bits.h"
32 33
 
... ...
@@ -55,7 +56,7 @@ static void h263_free_context(PayloadContext *data)
55 55
     av_free(data);
56 56
 }
57 57
 
58
-static int h263_init(AVFormatContext *ctx, int st_index, PayloadContext *data)
58
+static av_cold int h263_init(AVFormatContext *ctx, int st_index, PayloadContext *data)
59 59
 {
60 60
     if (st_index < 0)
61 61
         return 0;
... ...
@@ -33,6 +33,7 @@
33 33
  *                        FU-B packet types)
34 34
  */
35 35
 
36
+#include "libavutil/attributes.h"
36 37
 #include "libavutil/base64.h"
37 38
 #include "libavutil/avstring.h"
38 39
 #include "libavcodec/get_bits.h"
... ...
@@ -338,7 +339,8 @@ static void h264_free_context(PayloadContext *data)
338 338
     av_free(data);
339 339
 }
340 340
 
341
-static int h264_init(AVFormatContext *s, int st_index, PayloadContext *data)
341
+static av_cold int h264_init(AVFormatContext *s, int st_index,
342
+                             PayloadContext *data)
342 343
 {
343 344
     if (st_index < 0)
344 345
         return 0;
... ...
@@ -19,10 +19,11 @@
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 
22
-#include "rtpdec_formats.h"
22
+#include "libavutil/attributes.h"
23 23
 #include "libavutil/intreadwrite.h"
24
+#include "rtpdec_formats.h"
24 25
 
25
-static int mpeg_init(AVFormatContext *ctx, int st_index, PayloadContext *data)
26
+static av_cold int mpeg_init(AVFormatContext *ctx, int st_index, PayloadContext *data)
26 27
 {
27 28
     if (st_index < 0)
28 29
         return 0;
... ...
@@ -29,6 +29,7 @@
29 29
 
30 30
 #include "rtpdec_formats.h"
31 31
 #include "internal.h"
32
+#include "libavutil/attributes.h"
32 33
 #include "libavutil/avstring.h"
33 34
 #include "libavcodec/get_bits.h"
34 35
 
... ...
@@ -252,7 +253,8 @@ static int parse_sdp_line(AVFormatContext *s, int st_index,
252 252
     return 0;
253 253
 }
254 254
 
255
-static int init_video(AVFormatContext *s, int st_index, PayloadContext *data)
255
+static av_cold int init_video(AVFormatContext *s, int st_index,
256
+                              PayloadContext *data)
256 257
 {
257 258
     if (st_index < 0)
258 259
         return 0;
... ...
@@ -19,6 +19,7 @@
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 
22
+#include "libavutil/attributes.h"
22 23
 #include "mpegts.h"
23 24
 #include "rtpdec_formats.h"
24 25
 
... ...
@@ -43,7 +44,8 @@ static void mpegts_free_context(PayloadContext *data)
43 43
     av_free(data);
44 44
 }
45 45
 
46
-static int mpegts_init(AVFormatContext *ctx, int st_index, PayloadContext *data)
46
+static av_cold int mpegts_init(AVFormatContext *ctx, int st_index,
47
+                               PayloadContext *data)
47 48
 {
48 49
     data->ts = ff_mpegts_parse_open(ctx);
49 50
     if (!data->ts)
... ...
@@ -27,6 +27,7 @@
27 27
  * @author Josh Allmann <joshua.allmann@gmail.com>
28 28
  */
29 29
 
30
+#include "libavutil/attributes.h"
30 31
 #include "libavutil/avassert.h"
31 32
 #include "libavutil/avstring.h"
32 33
 #include "libavutil/base64.h"
... ...
@@ -69,8 +70,8 @@ static void xiph_free_context(PayloadContext * data)
69 69
     av_free(data);
70 70
 }
71 71
 
72
-static int xiph_vorbis_init(AVFormatContext *ctx, int st_index,
73
-                            PayloadContext *data)
72
+static av_cold int xiph_vorbis_init(AVFormatContext *ctx, int st_index,
73
+                                    PayloadContext *data)
74 74
 {
75 75
     if (st_index < 0)
76 76
         return 0;