]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/avidec.c
Remove some pointless TRACE level debug code
[ffmpeg] / libavformat / avidec.c
index 3666b573e0b21bea7b47ebdee25e51fcb120d1a5..0439c9c94cc95886e65b4aaf1838cbce275657e6 100644 (file)
@@ -652,12 +652,8 @@ static int avi_read_header(AVFormatContext *s)
                         pal_size = FFMIN(pal_size, st->codecpar->extradata_size);
                         pal_src  = st->codecpar->extradata +
                                    st->codecpar->extradata_size - pal_size;
-#if HAVE_BIGENDIAN
                         for (i = 0; i < pal_size / 4; i++)
-                            ast->pal[i] = av_bswap32(((uint32_t *)pal_src)[i]);
-#else
-                        memcpy(ast->pal, pal_src, pal_size);
-#endif
+                            ast->pal[i] = (0xFFu << 24) | AV_RL32(pal_src + 4 * i);
                         ast->has_pal = 1;
                     }
 
@@ -761,7 +757,8 @@ static int avi_read_header(AVFormatContext *s)
             break;
         case MKTAG('i', 'n', 'd', 'x'):
             pos = avio_tell(pb);
-            if (pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) &&
+            if ((pb->seekable & AVIO_SEEKABLE_NORMAL) &&
+                !(s->flags & AVFMT_FLAG_IGNIDX) &&
                 read_braindead_odml_indx(s, 0) < 0 &&
                 (s->error_recognition & AV_EF_EXPLODE))
                 goto fail;
@@ -828,7 +825,7 @@ fail:
         return AVERROR_INVALIDDATA;
     }
 
-    if (!avi->index_loaded && pb->seekable)
+    if (!avi->index_loaded && (pb->seekable & AVIO_SEEKABLE_NORMAL))
         avi_load_index(s);
     avi->index_loaded     = 1;
 
@@ -1241,17 +1238,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) {
@@ -1456,12 +1442,6 @@ static int avi_load_index(AVFormatContext *s)
             break;
         tag  = avio_rl32(pb);
         size = avio_rl32(pb);
-        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) {