[FFmpeg-devel] [PATCHv2 1/2] avcodec/vda_h264: use multichar literal portably

Ganesh Ajjanagadde gajjanagadde at gmail.com
Sat Sep 19 01:27:59 CEST 2015


Multichar literals are implementation defined, and thus trigger -Wmultichar:
http://fate.ffmpeg.org/log.cgi?time=20150918202532&log=compile&slot=x86_64-darwin-gcc-5.
This patch replaces them with AV_RB32.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 libavcodec/vda_h264.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c
index 8c526c0..bd411cc 100644
--- a/libavcodec/vda_h264.c
+++ b/libavcodec/vda_h264.c
@@ -339,7 +339,7 @@ int ff_vda_default_init(AVCodecContext *avctx)
     CFMutableDictionaryRef buffer_attributes;
     CFMutableDictionaryRef io_surface_properties;
     CFNumberRef cv_pix_fmt;
-    int32_t fmt = 'avc1', pix_fmt = vda_ctx->cv_pix_fmt_type;
+    int32_t fmt = AV_RB32("avc1"), pix_fmt = vda_ctx->cv_pix_fmt_type;
 
     // kCVPixelFormatType_420YpCbCr8Planar;
 
-- 
2.5.2



More information about the ffmpeg-devel mailing list