diff --git a/libavformat/apngdec.c b/libavformat/apngdec.c
index db501ecba3badb1a4bb2e5e2002939cb08e70bca..1e0f1c7c132e47a7ee2dac370f50e2089bd4710d 100644
--- a/libavformat/apngdec.c
+++ b/libavformat/apngdec.c
@@ -372,8 +372,13 @@ static int apng_read_packet(AVFormatContext *s, AVPacket *pkt)
             return ret;
         return 0;
     default:
-        avpriv_request_sample(s, "In-stream tag=%#08X len=%"PRId64"", tag, avio_tell(pb));
+        {
+        char tag_buf[5];
+
+        av_get_codec_tag_string(tag_buf, sizeof(tag_buf), tag);
+        avpriv_request_sample(s, "In-stream tag=%s (0x%08X) len=%"PRIu32, tag_buf, tag, len);
         avio_skip(pb, len + 4);
+        }
     }
 
     /* Handle the unsupported yet cases */