[FFmpeg-devel] [PATCHv2 2/2] avcodec/vda_h264_dec: use multichar literal portably
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Sat Sep 19 01:28:24 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 uses AV_RB32 to silence such warnings.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
libavcodec/vda_h264_dec.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavcodec/vda_h264_dec.c b/libavcodec/vda_h264_dec.c
index a092693..0a54747 100644
--- a/libavcodec/vda_h264_dec.c
+++ b/libavcodec/vda_h264_dec.c
@@ -186,22 +186,22 @@ static av_cold int vdadec_init(AVCodecContext *avctx)
memset(vda_ctx, 0, sizeof(struct vda_context));
vda_ctx->width = avctx->width;
vda_ctx->height = avctx->height;
- vda_ctx->format = 'avc1';
+ vda_ctx->format = AV_RB32("avc1");
vda_ctx->use_sync_decoding = 1;
vda_ctx->use_ref_buffer = 1;
ctx->pix_fmt = avctx->get_format(avctx, avctx->codec->pix_fmts);
switch (ctx->pix_fmt) {
case AV_PIX_FMT_UYVY422:
- vda_ctx->cv_pix_fmt_type = '2vuy';
+ vda_ctx->cv_pix_fmt_type = AV_RB32("2vuy");
break;
case AV_PIX_FMT_YUYV422:
- vda_ctx->cv_pix_fmt_type = 'yuvs';
+ vda_ctx->cv_pix_fmt_type = AV_RB32("yuvs");
break;
case AV_PIX_FMT_NV12:
- vda_ctx->cv_pix_fmt_type = '420v';
+ vda_ctx->cv_pix_fmt_type = AV_RB32("420v");
break;
case AV_PIX_FMT_YUV420P:
- vda_ctx->cv_pix_fmt_type = 'y420';
+ vda_ctx->cv_pix_fmt_type = AV_RB32("y420");
break;
default:
av_log(avctx, AV_LOG_ERROR, "Unsupported pixel format: %d\n", avctx->pix_fmt);
--
2.5.2
More information about the ffmpeg-devel
mailing list