[FFmpeg-cvslog] doc/examples/extract_mvs: re-indent after previous commit

Matthieu Bouron git at videolan.org
Tue Apr 4 13:10:48 EEST 2017


ffmpeg | branch: master | Matthieu Bouron <matthieu.bouron at gmail.com> | Mon Apr  3 16:32:50 2017 +0200| [400378b7b3a4fb34991c7267beb09272615fdea2] | committer: Matthieu Bouron

doc/examples/extract_mvs: re-indent after previous commit

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=400378b7b3a4fb34991c7267beb09272615fdea2
---

 doc/examples/extract_mvs.c | 56 +++++++++++++++++++++++-----------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/doc/examples/extract_mvs.c b/doc/examples/extract_mvs.c
index 552a733..7ae934e 100644
--- a/doc/examples/extract_mvs.c
+++ b/doc/examples/extract_mvs.c
@@ -35,40 +35,40 @@ static int video_frame_count = 0;
 
 static int decode_packet(const AVPacket *pkt)
 {
-        int ret = avcodec_send_packet(video_dec_ctx, pkt);
-        if (ret < 0) {
-            fprintf(stderr, "Error while sending a packet to the decoder: %s\n", av_err2str(ret));
+    int ret = avcodec_send_packet(video_dec_ctx, pkt);
+    if (ret < 0) {
+        fprintf(stderr, "Error while sending a packet to the decoder: %s\n", av_err2str(ret));
+        return ret;
+    }
+
+    while (ret >= 0)  {
+        ret = avcodec_receive_frame(video_dec_ctx, frame);
+        if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
+            break;
+        } else if (ret < 0) {
+            fprintf(stderr, "Error while receiving a frame from the decoder: %s\n", av_err2str(ret));
             return ret;
         }
 
-        while (ret >= 0)  {
-            ret = avcodec_receive_frame(video_dec_ctx, frame);
-            if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
-                break;
-            } else if (ret < 0) {
-                fprintf(stderr, "Error while receiving a frame from the decoder: %s\n", av_err2str(ret));
-                return ret;
-            }
-
-            if (ret >= 0) {
-                int i;
-                AVFrameSideData *sd;
-
-                video_frame_count++;
-                sd = av_frame_get_side_data(frame, AV_FRAME_DATA_MOTION_VECTORS);
-                if (sd) {
-                    const AVMotionVector *mvs = (const AVMotionVector *)sd->data;
-                    for (i = 0; i < sd->size / sizeof(*mvs); i++) {
-                        const AVMotionVector *mv = &mvs[i];
-                        printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64"\n",
-                            video_frame_count, mv->source,
-                            mv->w, mv->h, mv->src_x, mv->src_y,
-                            mv->dst_x, mv->dst_y, mv->flags);
-                    }
+        if (ret >= 0) {
+            int i;
+            AVFrameSideData *sd;
+
+            video_frame_count++;
+            sd = av_frame_get_side_data(frame, AV_FRAME_DATA_MOTION_VECTORS);
+            if (sd) {
+                const AVMotionVector *mvs = (const AVMotionVector *)sd->data;
+                for (i = 0; i < sd->size / sizeof(*mvs); i++) {
+                    const AVMotionVector *mv = &mvs[i];
+                    printf("%d,%2d,%2d,%2d,%4d,%4d,%4d,%4d,0x%"PRIx64"\n",
+                        video_frame_count, mv->source,
+                        mv->w, mv->h, mv->src_x, mv->src_y,
+                        mv->dst_x, mv->dst_y, mv->flags);
                 }
-                av_frame_unref(frame);
             }
+            av_frame_unref(frame);
         }
+    }
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list