[FFmpeg-devel] [PATCH 1/2] ffplay: move up is_realtime function

Marton Balint cus at passwd.hu
Fri Nov 2 00:59:12 CET 2012


Signed-off-by: Marton Balint <cus at passwd.hu>
---
 ffplay.c |   32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/ffplay.c b/ffplay.c
index e3b156a..db9299c 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1252,6 +1252,22 @@ static void update_video_pts(VideoState *is, double pts, int64_t pos, int serial
         check_external_clock_sync(is, is->video_current_pts);
 }
 
+static int is_realtime(AVFormatContext *s)
+{
+    if(   !strcmp(s->iformat->name, "rtp")
+       || !strcmp(s->iformat->name, "rtsp")
+       || !strcmp(s->iformat->name, "sdp")
+    )
+        return 1;
+
+    if(s->pb && (   !strncmp(s->filename, "rtp:", 4)
+                 || !strncmp(s->filename, "udp:", 4)
+                )
+    )
+        return 1;
+    return 0;
+}
+
 /* called to display each frame */
 static void video_refresh(void *opaque)
 {
@@ -2453,22 +2469,6 @@ static int decode_interrupt_cb(void *ctx)
     return is->abort_request;
 }
 
-static int is_realtime(AVFormatContext *s)
-{
-    if(   !strcmp(s->iformat->name, "rtp")
-       || !strcmp(s->iformat->name, "rtsp")
-       || !strcmp(s->iformat->name, "sdp")
-    )
-        return 1;
-
-    if(s->pb && (   !strncmp(s->filename, "rtp:", 4)
-                 || !strncmp(s->filename, "udp:", 4)
-                )
-    )
-        return 1;
-    return 0;
-}
-
 /* this thread gets the stream from the disk or the network */
 static int read_thread(void *arg)
 {
-- 
1.7.10.4



More information about the ffmpeg-devel mailing list