summaryrefslogtreecommitdiff
path: root/libavformat/dxa.c
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2017-03-27 09:45:35 +0200
committerClément Bœsch <u@pkh.me>2017-03-29 14:49:29 +0200
commitbec96a7286bc415dd737c8c8f430f0176999e720 (patch)
treeb89f90048e94b153a4a3d7e494d93c57cc7db0a2 /libavformat/dxa.c
parentd3cedc54cc872a376851828c88103c653fc8c395 (diff)
downloadffmpeg-bec96a7286bc415dd737c8c8f430f0176999e720.tar.gz
lavf: use av_fourcc2str() where appropriate
Diffstat (limited to 'libavformat/dxa.c')
-rw-r--r--libavformat/dxa.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/dxa.c b/libavformat/dxa.c
index 162838c135..50193907be 100644
--- a/libavformat/dxa.c
+++ b/libavformat/dxa.c
@@ -171,11 +171,13 @@ static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
}
avio_seek(s->pb, c->vidpos, SEEK_SET);
while(!avio_feof(s->pb) && c->frames){
+ uint32_t tag;
if ((ret = avio_read(s->pb, buf, 4)) != 4) {
av_log(s, AV_LOG_ERROR, "failed reading chunk type\n");
return ret < 0 ? ret : AVERROR_INVALIDDATA;
}
- switch(AV_RL32(buf)){
+ tag = AV_RL32(buf);
+ switch (tag) {
case MKTAG('N', 'U', 'L', 'L'):
if(av_new_packet(pkt, 4 + pal_size) < 0)
return AVERROR(ENOMEM);
@@ -217,7 +219,7 @@ static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
c->readvid = 0;
return 0;
default:
- av_log(s, AV_LOG_ERROR, "Unknown tag %c%c%c%c\n", buf[0], buf[1], buf[2], buf[3]);
+ av_log(s, AV_LOG_ERROR, "Unknown tag %s\n", av_fourcc2str(tag));
return AVERROR_INVALIDDATA;
}
}