[FFmpeg-cvslog] ffmpeg_hw: Mark some strings as const

Mark Thompson git at videolan.org
Mon Jun 3 01:05:36 EEST 2019


ffmpeg | branch: master | Mark Thompson <sw at jkqxz.net> | Mon May  6 15:29:01 2019 +0100| [1f8b36329f20ea08eafe3823b1e1b3785d74768d] | committer: Mark Thompson

ffmpeg_hw: Mark some strings as const

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

 fftools/ffmpeg.h    | 2 +-
 fftools/ffmpeg_hw.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index eb1eaf6363..7b6f802082 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -72,7 +72,7 @@ typedef struct HWAccel {
 } HWAccel;
 
 typedef struct HWDevice {
-    char *name;
+    const char *name;
     enum AVHWDeviceType type;
     AVBufferRef *device_ref;
 } HWDevice;
diff --git a/fftools/ffmpeg_hw.c b/fftools/ffmpeg_hw.c
index 2ec1813854..d454ae7179 100644
--- a/fftools/ffmpeg_hw.c
+++ b/fftools/ffmpeg_hw.c
@@ -99,7 +99,7 @@ int hw_device_init_from_string(const char *arg, HWDevice **dev_out)
     // -> av_hwdevice_ctx_create_derived()
 
     AVDictionary *options = NULL;
-    char *type_name = NULL, *name = NULL, *device = NULL;
+    const char *type_name = NULL, *name = NULL, *device = NULL;
     enum AVHWDeviceType type;
     HWDevice *dev, *src;
     AVBufferRef *device_ref = NULL;



More information about the ffmpeg-cvslog mailing list