]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/seek.c
udp: remove resource.h inclusion, it breaks mingw compilation.
[ffmpeg] / libavformat / seek.c
index 685cbbfe14ee26772325451f0a58b65b358a393e..dd6109b68c946987a6aa726624cef28f8282b867 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "seek.h"
 #include "libavutil/mem.h"
+#include "internal.h"
 
 // NOTE: implementation should be moved here in another patch, to keep patches
 // separated.
@@ -161,7 +162,7 @@ static void search_hi_lo_keyframes(AVFormatContext *s,
 
         // Evaluate key frames with known TS (or any frames, if AVSEEK_FLAG_ANY set).
         if (pts != AV_NOPTS_VALUE &&
-            ((flg & PKT_FLAG_KEY) || (flags & AVSEEK_FLAG_ANY))) {
+            ((flg & AV_PKT_FLAG_KEY) || (flags & AVSEEK_FLAG_ANY))) {
             if (flags & AVSEEK_FLAG_BYTE) {
                 // for byte seeking, use position as timestamp
                 ts        = pos;
@@ -236,7 +237,7 @@ static void search_hi_lo_keyframes(AVFormatContext *s,
     }
 
     // Clean up the parser.
-    av_read_frame_flush(s);
+    ff_read_frame_flush(s);
 }
 
 int64_t ff_gen_syncpoint_search(AVFormatContext *s,
@@ -312,7 +313,7 @@ int64_t ff_gen_syncpoint_search(AVFormatContext *s,
     step = s->pb->buffer_size;
     curpos = FFMAX(pos - step / 2, 0);
     for (;;) {
-        url_fseek(s->pb, curpos, SEEK_SET);
+        avio_seek(s->pb, curpos, SEEK_SET);
         search_hi_lo_keyframes(s,
                                ts, time_base,
                                flags,
@@ -384,7 +385,7 @@ int64_t ff_gen_syncpoint_search(AVFormatContext *s,
         }
     }
 
-    url_fseek(s->pb, pos, SEEK_SET);
+    avio_seek(s->pb, pos, SEEK_SET);
     av_free(sync);
     return pos;
 }
@@ -404,7 +405,7 @@ AVParserState *ff_store_parser_state(AVFormatContext *s)
         return NULL;
     }
 
-    state->fpos = url_ftell(s->pb);
+    state->fpos = avio_tell(s->pb);
 
     // copy context structures
     state->cur_st                           = s->cur_st;
@@ -450,12 +451,12 @@ void ff_restore_parser_state(AVFormatContext *s, AVParserState *state)
     int i;
     AVStream *st;
     AVParserStreamState *ss;
-    av_read_frame_flush(s);
+    ff_read_frame_flush(s);
 
     if (!state)
         return;
 
-    url_fseek(s->pb, state->fpos, SEEK_SET);
+    avio_seek(s->pb, state->fpos, SEEK_SET);
 
     // copy context structures
     s->cur_st                           = state->cur_st;