]> git.sesse.net Git - ffmpeg/blobdiff - ffplay.c
Replace hackish support for amr-nb and amr-wb. Instead of including the source
[ffmpeg] / ffplay.c
index 8e034cc367c60ff212cb6cb6a1e099b6e4d37e18..96615d8d6f4d0d24fa8e67aacab10cdbb74291a2 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -49,6 +49,8 @@
  }
 #endif
 
+#undef exit
+
 //#define DEBUG_SYNC
 
 #define MAX_VIDEOQ_SIZE (5 * 256 * 1024)
@@ -1366,26 +1368,26 @@ static int video_thread(void *arg)
 
         /* NOTE: ipts is the PTS of the _first_ picture beginning in
            this packet, if any */
-            global_video_pkt_pts= pkt->pts;
-            len1 = avcodec_decode_video(is->video_st->codec,
-                                        frame, &got_picture,
-                                        pkt->data, pkt->size);
-
-            if(   (decoder_reorder_pts || pkt->dts == AV_NOPTS_VALUE)
-               && frame->opaque && *(uint64_t*)frame->opaque != AV_NOPTS_VALUE)
-                pts= *(uint64_t*)frame->opaque;
-            else if(pkt->dts != AV_NOPTS_VALUE)
-                pts= pkt->dts;
-            else
-                pts= 0;
-            pts *= av_q2d(is->video_st->time_base);
+        global_video_pkt_pts= pkt->pts;
+        len1 = avcodec_decode_video(is->video_st->codec,
+                                    frame, &got_picture,
+                                    pkt->data, pkt->size);
+
+        if(   (decoder_reorder_pts || pkt->dts == AV_NOPTS_VALUE)
+           && frame->opaque && *(uint64_t*)frame->opaque != AV_NOPTS_VALUE)
+            pts= *(uint64_t*)frame->opaque;
+        else if(pkt->dts != AV_NOPTS_VALUE)
+            pts= pkt->dts;
+        else
+            pts= 0;
+        pts *= av_q2d(is->video_st->time_base);
 
 //            if (len1 < 0)
 //                break;
-            if (got_picture) {
-                if (output_picture2(is, frame, pts) < 0)
-                    goto the_end;
-            }
+        if (got_picture) {
+            if (output_picture2(is, frame, pts) < 0)
+                goto the_end;
+        }
         av_free_packet(pkt);
         if (step)
             if (cur_stream)
@@ -2376,7 +2378,7 @@ static void opt_frame_size(const char *arg)
     }
 }
 
-void opt_width(const char *arg)
+static void opt_width(const char *arg)
 {
     screen_width = atoi(arg);
     if(screen_width<=0){
@@ -2385,7 +2387,7 @@ void opt_width(const char *arg)
     }
 }
 
-void opt_height(const char *arg)
+static void opt_height(const char *arg)
 {
     screen_height = atoi(arg);
     if(screen_height<=0){
@@ -2409,14 +2411,14 @@ static void opt_frame_pix_fmt(const char *arg)
 }
 
 #ifdef CONFIG_NETWORK
-void opt_rtp_tcp(void)
+static void opt_rtp_tcp(void)
 {
     /* only tcp protocol */
     rtsp_default_protocols = (1 << RTSP_PROTOCOL_RTP_TCP);
 }
 #endif
 
-void opt_sync(const char *arg)
+static void opt_sync(const char *arg)
 {
     if (!strcmp(arg, "audio"))
         av_sync_type = AV_SYNC_AUDIO_MASTER;
@@ -2428,7 +2430,7 @@ void opt_sync(const char *arg)
         show_help();
 }
 
-void opt_seek(const char *arg)
+static void opt_seek(const char *arg)
 {
     start_time = parse_date(arg, 1);
 }