ffmpeg_hw: Mark some strings as const
authorMark Thompson <sw@jkqxz.net>
Mon, 6 May 2019 14:29:01 +0000 (15:29 +0100)
committerMark Thompson <sw@jkqxz.net>
Sun, 2 Jun 2019 21:58:22 +0000 (22:58 +0100)
fftools/ffmpeg.h
fftools/ffmpeg_hw.c

index eb1eaf6..7b6f802 100644 (file)
@@ -72,7 +72,7 @@ typedef struct HWAccel {
 } HWAccel;
 
 typedef struct HWDevice {
-    char *name;
+    const char *name;
     enum AVHWDeviceType type;
     AVBufferRef *device_ref;
 } HWDevice;
index 2ec1813..d454ae7 100644 (file)
@@ -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;