[FFmpeg-soc] [soc]: r1637 - libavfilter/diffs/01_ffplay_get_video_frame.diff

vitor subversion at mplayerhq.hu
Fri Dec 21 16:40:18 CET 2007


Author: vitor
Date: Fri Dec 21 16:40:18 2007
New Revision: 1637

Log:
Remove cosmetics from patch

Modified:
   libavfilter/diffs/01_ffplay_get_video_frame.diff

Modified: libavfilter/diffs/01_ffplay_get_video_frame.diff
==============================================================================
--- libavfilter/diffs/01_ffplay_get_video_frame.diff	(original)
+++ libavfilter/diffs/01_ffplay_get_video_frame.diff	Fri Dec 21 16:40:18 2007
@@ -1,8 +1,8 @@
 Index: ffplay.c
 ===================================================================
---- ffplay.c	(revision 11113)
+--- ffplay.c	(revision 11293)
 +++ ffplay.c	(working copy)
-@@ -1343,49 +1343,63 @@
+@@ -1343,49 +1343,67 @@
      avcodec_default_release_buffer(c, pic);
  }
  
@@ -11,19 +11,17 @@ Index: ffplay.c
  {
 -    VideoState *is = arg;
      AVPacket pkt1, *pkt = &pkt1;
--    int len1, got_picture;
+     int len1, got_picture;
 -    AVFrame *frame= avcodec_alloc_frame();
 -    double pts;
-+    int got_picture;
  
 -    for(;;) {
 -        while (is->paused && !is->videoq.abort_request) {
 -            SDL_Delay(10);
 -        }
--        if (packet_queue_get(&is->videoq, pkt, 1) < 0)
+         if (packet_queue_get(&is->videoq, pkt, 1) < 0)
 -            break;
-+    if (packet_queue_get(&is->videoq, pkt, 1) < 0)
-+        return -1;
++            return -1;
  
          if(pkt->data == flush_pkt.data){
              avcodec_flush_buffers(is->video_st->codec);
@@ -34,10 +32,9 @@ Index: ffplay.c
          /* 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,
+         len1 = avcodec_decode_video(is->video_st->codec,
 -                                    frame, &got_picture,
 -                                    pkt->data, pkt->size);
-+        avcodec_decode_video(is->video_st->codec,
 +                             frame, &got_picture,
 +                             pkt->data, pkt->size);
  
@@ -53,15 +50,17 @@ Index: ffplay.c
 -        pts *= av_q2d(is->video_st->time_base);
 +            *pts= 0;
  
--//            if (len1 < 0)
--//                break;
+ //            if (len1 < 0)
+ //                break;
 -        if (got_picture) {
 -            if (output_picture2(is, frame, pts) < 0)
+-                goto the_end;
+-        }
 +        /* put pts into units of 1/AV_TIME_BASE */
 +        *pts = AV_TIME_BASE * (*pts) * is->video_st->time_base.num /
 +                               is->video_st->time_base.den;
 +
-+        av_free_packet(pkt);
+         av_free_packet(pkt);
 +        if(got_picture)
 +            return 1;
 +    return 0;
@@ -81,13 +80,13 @@ Index: ffplay.c
 +        ret = get_video_frame(is, frame, &pts_int);
 +
 +        if (ret < 0) goto the_end;
-+            pts  = pts_int;
-+            pts /= AV_TIME_BASE;
-+            if (ret)
-+            if(output_picture2(is, frame, pts) < 0)
-                 goto the_end;
--        }
--        av_free_packet(pkt);
++
++        pts  = pts_int;
++        pts /= AV_TIME_BASE;
++        if (ret)
++        if(output_picture2(is, frame, pts) < 0)
++            goto the_end;
++
          if (step)
              if (cur_stream)
                  stream_pause(cur_stream);



More information about the FFmpeg-soc mailing list