Merge commit '8ad9f9d675eab139aa2208722009eeed981460dd'
[ffmpeg.git] / libavformat / avidec.c
index a7e9ab1..4e694fe 100644 (file)
@@ -117,13 +117,9 @@ static const AVMetadataConv avi_metadata_conv[] = {
 static int avi_load_index(AVFormatContext *s);
 static int guess_ni_flag(AVFormatContext *s);
 
-#define print_tag(str, tag, size)                        \
-    av_log(NULL, AV_LOG_TRACE, "pos:%"PRIX64" %s: tag=%c%c%c%c size=0x%x\n", \
-            avio_tell(pb), str, tag & 0xff,              \
-            (tag >> 8) & 0xff,                           \
-            (tag >> 16) & 0xff,                          \
-            (tag >> 24) & 0xff,                          \
-            size)
+#define print_tag(str, tag, size)                                      \
+    av_log(NULL, AV_LOG_TRACE, "pos:%"PRIX64" %s: tag=%s size=0x%x\n", \
+           avio_tell(pb), str, av_fourcc2str(tag), size)                  \
 
 static inline int get_duration(AVIStream *ast, int len)
 {
@@ -811,14 +807,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
                                                             tag1);
                     /* If codec is not found yet, try with the mov tags. */
                     if (!st->codecpar->codec_id) {
-                        char tag_buf[32];
-                        av_get_codec_tag_string(tag_buf, sizeof(tag_buf), tag1);
                         st->codecpar->codec_id =
                             ff_codec_get_id(ff_codec_movvideo_tags, tag1);
                         if (st->codecpar->codec_id)
                            av_log(s, AV_LOG_WARNING,
                                   "mov tag found in avi (fourcc %s)\n",
-                                  tag_buf);
+                                  av_fourcc2str(tag1));
                     }
                     /* This is needed to get the pict type which is necessary
                      * for generating correct pts. */
@@ -992,13 +986,11 @@ FF_ENABLE_DEPRECATION_WARNINGS
             }
         default:
             if (size > 1000000) {
-                char tag_buf[32];
-                av_get_codec_tag_string(tag_buf, sizeof(tag_buf), tag);
                 av_log(s, AV_LOG_ERROR,
                        "Something went wrong during header parsing, "
                        "tag %s has size %u, "
                        "I will ignore it and try to continue anyway.\n",
-                       tag_buf, size);
+                       av_fourcc2str(tag), size);
                 if (s->error_recognition & AV_EF_EXPLODE)
                     goto fail;
                 avi->movi_list = avio_tell(pb) - 4;
@@ -1479,17 +1471,6 @@ resync:
 //                pkt->dts += ast->start;
             if (ast->sample_size)
                 pkt->dts /= ast->sample_size;
-            av_log(s, AV_LOG_TRACE,
-                    "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d "
-                    "base:%d st:%d size:%d\n",
-                    pkt->dts,
-                    ast->frame_offset,
-                    ast->scale,
-                    ast->rate,
-                    ast->sample_size,
-                    AV_TIME_BASE,
-                    avi->stream_index,
-                    size);
             pkt->stream_index = avi->stream_index;
 
             if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO && st->index_entries) {
@@ -1760,13 +1741,6 @@ static int avi_load_index(AVFormatContext *s)
             break;
         next = avio_tell(pb) + size + (size & 1);
 
-        av_log(s, AV_LOG_TRACE, "tag=%c%c%c%c size=0x%x\n",
-                 tag        & 0xff,
-                (tag >>  8) & 0xff,
-                (tag >> 16) & 0xff,
-                (tag >> 24) & 0xff,
-                size);
-
         if (tag == MKTAG('i', 'd', 'x', '1') &&
             avi_read_idx1(s, size) >= 0) {
             avi->index_loaded=2;