[FFmpeg-cvslog] lavc: use av_fourcc2str() where appropriate

Clément Bœsch git at videolan.org
Wed Mar 29 15:55:04 EEST 2017


ffmpeg | branch: master | Clément Bœsch <u at pkh.me> | Mon Mar 27 09:45:11 2017 +0200| [2d12b910f71093b782726d00b94643f7f21ca27d] | committer: Clément Bœsch

lavc: use av_fourcc2str() where appropriate

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

 libavcodec/pngdec.c   | 7 ++-----
 libavcodec/vqavideo.c | 8 ++------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index a4eb6cc..c08665b 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -1143,11 +1143,8 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,
         }
         tag = bytestream2_get_le32(&s->gb);
         if (avctx->debug & FF_DEBUG_STARTCODE)
-            av_log(avctx, AV_LOG_DEBUG, "png: tag=%c%c%c%c length=%u\n",
-                (tag & 0xff),
-                ((tag >> 8) & 0xff),
-                ((tag >> 16) & 0xff),
-                ((tag >> 24) & 0xff), length);
+            av_log(avctx, AV_LOG_DEBUG, "png: tag=%s length=%u\n",
+                   av_fourcc2str(tag), length);
 
         if (avctx->codec_id == AV_CODEC_ID_PNG &&
             avctx->skip_frame == AVDISCARD_ALL) {
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index 81d50bb..0e70be1 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -384,12 +384,8 @@ static int vqa_decode_chunk(VqaContext *s, AVFrame *frame)
             break;
 
         default:
-            av_log(s->avctx, AV_LOG_ERROR, "Found unknown chunk type: %c%c%c%c (%08X)\n",
-            (chunk_type >> 24) & 0xFF,
-            (chunk_type >> 16) & 0xFF,
-            (chunk_type >>  8) & 0xFF,
-            (chunk_type >>  0) & 0xFF,
-            chunk_type);
+            av_log(s->avctx, AV_LOG_ERROR, "Found unknown chunk type: %s (%08X)\n",
+                   av_fourcc2str(av_bswap32(chunk_type)), chunk_type);
             break;
         }
 



More information about the ffmpeg-cvslog mailing list