[FFmpeg-cvslog] avdevice/alldevices: Mark iterators as av_cold

Andreas Rheinhardt git at videolan.org
Sun Mar 17 17:07:14 EET 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Mar 13 18:05:29 2024 +0100| [b6301dc6586f9789b867bc2d75e74e10f6c35d0c] | committer: Andreas Rheinhardt

avdevice/alldevices: Mark iterators as av_cold

Because they are.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6301dc6586f9789b867bc2d75e74e10f6c35d0c
---

 libavdevice/alldevices.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c
index 6396076ecf..9b9a9146c7 100644
--- a/libavdevice/alldevices.c
+++ b/libavdevice/alldevices.c
@@ -18,6 +18,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/attributes.h"
 #include "libavutil/attributes_internal.h"
 #include "libavformat/demux.h"
 #include "libavformat/internal.h"
@@ -66,12 +67,12 @@ FF_VISIBILITY_POP_HIDDEN
 #include "libavdevice/outdev_list.c"
 #include "libavdevice/indev_list.c"
 
-void avdevice_register_all(void)
+av_cold void avdevice_register_all(void)
 {
     avpriv_register_devices(outdev_list, indev_list);
 }
 
-static const void *next_input(const AVInputFormat *prev, AVClassCategory c2)
+static av_cold const void *next_input(const AVInputFormat *prev, AVClassCategory c2)
 {
     const AVClass *pc;
     const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_INPUT;
@@ -97,7 +98,7 @@ static const void *next_input(const AVInputFormat *prev, AVClassCategory c2)
     return fmt;
 }
 
-static const void *next_output(const AVOutputFormat *prev, AVClassCategory c2)
+static av_cold const void *next_output(const AVOutputFormat *prev, AVClassCategory c2)
 {
     const AVClass *pc;
     const AVClassCategory c1 = AV_CLASS_CATEGORY_DEVICE_OUTPUT;
@@ -123,22 +124,22 @@ static const void *next_output(const AVOutputFormat *prev, AVClassCategory c2)
     return fmt;
 }
 
-const AVInputFormat *av_input_audio_device_next(const AVInputFormat  *d)
+av_cold const AVInputFormat *av_input_audio_device_next(const AVInputFormat  *d)
 {
     return next_input(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT);
 }
 
-const AVInputFormat *av_input_video_device_next(const AVInputFormat  *d)
+av_cold const AVInputFormat *av_input_video_device_next(const AVInputFormat  *d)
 {
     return next_input(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT);
 }
 
-const AVOutputFormat *av_output_audio_device_next(const AVOutputFormat *d)
+av_cold const AVOutputFormat *av_output_audio_device_next(const AVOutputFormat *d)
 {
     return next_output(d, AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT);
 }
 
-const AVOutputFormat *av_output_video_device_next(const AVOutputFormat *d)
+av_cold const AVOutputFormat *av_output_video_device_next(const AVOutputFormat *d)
 {
     return next_output(d, AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT);
 }



More information about the ffmpeg-cvslog mailing list