Index: libs/libavformat/utils.c
===================================================================
--- libs/libavformat/utils.c	(revision 12241)
+++ libs/libavformat/utils.c	(working copy)
@@ -1866,15 +1866,47 @@
 /**
  * @brief Read the beginning of a media file to get stream information.
  *
+ * This uses the helper function to determine the stream info quickly to
+ * cut down channel change time.
+ *
+ * @param ic media file handle
+ * @return >=0 if OK. AVERROR_xxx if error.  
+ */
+int av_find_stream_info(AVFormatContext *ic)
+{
+    return av_find_stream_info_helper(ic, 0);
+}
+
+/**
+ * @brief Read the beginning of a media file to get stream information.
+ *
+ * This uses the helper function to determine the stream info in a thorough
+ * fashion so that we don't miss any streams.
+ *
+ * @param ic media file handle
+ * @return >=0 if OK. AVERROR_xxx if error.  
+ */
+int av_find_stream_info_deep(AVFormatContext *ic)
+{
+    return av_find_stream_info_helper(ic, 1);
+}
+
+/**
+ * @brief Read the beginning of a media file to get stream information.
+ *
  * This is useful for file formats with no headers such as MPEG. This
  * function also computes the real frame rate in case of mpeg2 repeat
  * frame mode.
  *
+ * If we specify a deep search, it will take longer to do (not good for
+ * channel changes) but will pick up all stream info (good for mytharchive).
+ *
  * @param ic media file handle
+ * @param deepsearch flag to indicate whether the search is fast (0) or thorough (1)
  * @return >=0 if OK. AVERROR_xxx if error.  
  * @todo let user decide somehow what information is needed so we dont waste time geting stuff the user doesnt need
  */
-int av_find_stream_info(AVFormatContext *ic)
+int av_find_stream_info_helper(AVFormatContext *ic, int deepsearch)
 {
     int i, count, ret, read_size, j, read_packets = 0;
     AVStream *st;
@@ -1937,7 +1969,7 @@
                stop here */
             if (!(ic->ctx_flags & AVFMTCTX_NOHEADER) ||
                 (read_size >= MAX_READ_SIZE || read_packets >= MAX_FRAMES) ||
-                (hasvideo && hasaudio)) {
+                (hasvideo && hasaudio && (deepsearch == 0))) {
                 /* if we found the info for all the codecs, we can stop */
                 ret = count;
                 break;
Index: libs/libavformat/avformat.h
===================================================================
--- libs/libavformat/avformat.h	(revision 12241)
+++ libs/libavformat/avformat.h	(working copy)
@@ -476,6 +476,8 @@
 #define AVERROR_NOTSUPP     (-7)  /* operation not supported */
 
 int av_find_stream_info(AVFormatContext *ic);
+int av_find_stream_info_deep(AVFormatContext *ic);
+int av_find_stream_info_helper(AVFormatContext *ic, int deepsearch);
 int av_read_packet(AVFormatContext *s, AVPacket *pkt);
 int av_read_frame(AVFormatContext *s, AVPacket *pkt);
 int av_seek_frame(AVFormatContext *s, int stream_index, int64_t timestamp, int flags);

