]> git.sesse.net Git - ffmpeg/commitdiff
libzvbi-teletextdec: fix indentation after last commit
authorMarton Balint <cus@passwd.hu>
Sun, 29 Sep 2013 13:23:37 +0000 (15:23 +0200)
committerMarton Balint <cus@passwd.hu>
Sun, 10 Nov 2013 17:57:51 +0000 (18:57 +0100)
Signed-off-by: Marton Balint <cus@passwd.hu>
libavcodec/libzvbi-teletextdec.c

index 1ebe6ca33d701e6cd03dd727d27730de6f9befea..41accfc83f9db47ab4dbe76910b4b7a321227b3e 100644 (file)
@@ -355,39 +355,39 @@ teletext_decode_frame(AVCodecContext *avctx,
         ctx->pts = av_rescale_q(pkt->pts, avctx->pkt_timebase, AV_TIME_BASE_Q);
 
     if (left) {
-    // We allow unreasonably big packets, even if the standard only allows a max size of 1472
-    if ((pesheader_size + left) < 184 || (pesheader_size + left) > 65504 || (pesheader_size + left) % 184 != 0)
-        return AVERROR_INVALIDDATA;
+        // We allow unreasonably big packets, even if the standard only allows a max size of 1472
+        if ((pesheader_size + left) < 184 || (pesheader_size + left) > 65504 || (pesheader_size + left) % 184 != 0)
+            return AVERROR_INVALIDDATA;
 
-    memset(pesheader + 14, 0xff, pesheader_size - 14);
-    AV_WB16(pesheader + 4, left + pesheader_size - 6);
+        memset(pesheader + 14, 0xff, pesheader_size - 14);
+        AV_WB16(pesheader + 4, left + pesheader_size - 6);
 
-    /* PTS is deliberately left as 0 in the PES header, otherwise libzvbi uses
-     * it to detect dropped frames. Unforunatey the guessed packet PTS values
-     * (see mpegts demuxer) are not accurate enough to pass that test. */
-    vbi_dvb_demux_cor(ctx->dx, ctx->sliced, 64, NULL, &pesheader_buf, &pesheader_size);
+        /* PTS is deliberately left as 0 in the PES header, otherwise libzvbi uses
+         * it to detect dropped frames. Unforunatey the guessed packet PTS values
+         * (see mpegts demuxer) are not accurate enough to pass that test. */
+        vbi_dvb_demux_cor(ctx->dx, ctx->sliced, 64, NULL, &pesheader_buf, &pesheader_size);
 
-    while (left > 0) {
-        int64_t pts = 0;
-        unsigned int lines = vbi_dvb_demux_cor(ctx->dx, ctx->sliced, 64, &pts, &buf, &left);
+        while (left > 0) {
+            int64_t pts = 0;
+            unsigned int lines = vbi_dvb_demux_cor(ctx->dx, ctx->sliced, 64, &pts, &buf, &left);
 #ifdef DEBUG
-        av_log(avctx, AV_LOG_DEBUG,
-               "ctx=%p buf_size=%d left=%u lines=%u pts=%f pkt_pts=%f\n",
-               ctx, pkt->size, left, lines, (double)pts/90000.0, (double)pkt->pts/90000.0);
+            av_log(avctx, AV_LOG_DEBUG,
+                   "ctx=%p buf_size=%d left=%u lines=%u pts=%f pkt_pts=%f\n",
+                   ctx, pkt->size, left, lines, (double)pts/90000.0, (double)pkt->pts/90000.0);
 #endif
-        if (lines > 0) {
+            if (lines > 0) {
 #ifdef DEBUGx
-            int i;
-            for(i=0; i<lines; ++i)
-                av_log(avctx, AV_LOG_DEBUG,
-                       "lines=%d id=%x\n", i, ctx->sliced[i].id);
+                int i;
+                for(i=0; i<lines; ++i)
+                    av_log(avctx, AV_LOG_DEBUG,
+                           "lines=%d id=%x\n", i, ctx->sliced[i].id);
 #endif
-            vbi_decode(ctx->vbi, ctx->sliced, lines, (double)pts/90000.0);
-            ctx->lines_processed += lines;
+                vbi_decode(ctx->vbi, ctx->sliced, lines, (double)pts/90000.0);
+                ctx->lines_processed += lines;
+            }
         }
-    }
-    ctx->pts = AV_NOPTS_VALUE;
-    ret = pkt->size;
+        ctx->pts = AV_NOPTS_VALUE;
+        ret = pkt->size;
     }
 
     // is there a subtitle to pass?