mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-10-11 03:16:59 +02:00
libzvbi-teletextdec: fix indentation after last commit
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
a494757b34
commit
688652e0d6
@ -355,39 +355,39 @@ teletext_decode_frame(AVCodecContext *avctx,
|
|||||||
ctx->pts = av_rescale_q(pkt->pts, avctx->pkt_timebase, AV_TIME_BASE_Q);
|
ctx->pts = av_rescale_q(pkt->pts, avctx->pkt_timebase, AV_TIME_BASE_Q);
|
||||||
|
|
||||||
if (left) {
|
if (left) {
|
||||||
// We allow unreasonably big packets, even if the standard only allows a max size of 1472
|
// 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)
|
if ((pesheader_size + left) < 184 || (pesheader_size + left) > 65504 || (pesheader_size + left) % 184 != 0)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
memset(pesheader + 14, 0xff, pesheader_size - 14);
|
memset(pesheader + 14, 0xff, pesheader_size - 14);
|
||||||
AV_WB16(pesheader + 4, left + pesheader_size - 6);
|
AV_WB16(pesheader + 4, left + pesheader_size - 6);
|
||||||
|
|
||||||
/* PTS is deliberately left as 0 in the PES header, otherwise libzvbi uses
|
/* PTS is deliberately left as 0 in the PES header, otherwise libzvbi uses
|
||||||
* it to detect dropped frames. Unforunatey the guessed packet PTS values
|
* it to detect dropped frames. Unforunatey the guessed packet PTS values
|
||||||
* (see mpegts demuxer) are not accurate enough to pass that test. */
|
* (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);
|
vbi_dvb_demux_cor(ctx->dx, ctx->sliced, 64, NULL, &pesheader_buf, &pesheader_size);
|
||||||
|
|
||||||
while (left > 0) {
|
while (left > 0) {
|
||||||
int64_t pts = 0;
|
int64_t pts = 0;
|
||||||
unsigned int lines = vbi_dvb_demux_cor(ctx->dx, ctx->sliced, 64, &pts, &buf, &left);
|
unsigned int lines = vbi_dvb_demux_cor(ctx->dx, ctx->sliced, 64, &pts, &buf, &left);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
av_log(avctx, AV_LOG_DEBUG,
|
av_log(avctx, AV_LOG_DEBUG,
|
||||||
"ctx=%p buf_size=%d left=%u lines=%u pts=%f pkt_pts=%f\n",
|
"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);
|
ctx, pkt->size, left, lines, (double)pts/90000.0, (double)pkt->pts/90000.0);
|
||||||
#endif
|
#endif
|
||||||
if (lines > 0) {
|
if (lines > 0) {
|
||||||
#ifdef DEBUGx
|
#ifdef DEBUGx
|
||||||
int i;
|
int i;
|
||||||
for(i=0; i<lines; ++i)
|
for(i=0; i<lines; ++i)
|
||||||
av_log(avctx, AV_LOG_DEBUG,
|
av_log(avctx, AV_LOG_DEBUG,
|
||||||
"lines=%d id=%x\n", i, ctx->sliced[i].id);
|
"lines=%d id=%x\n", i, ctx->sliced[i].id);
|
||||||
#endif
|
#endif
|
||||||
vbi_decode(ctx->vbi, ctx->sliced, lines, (double)pts/90000.0);
|
vbi_decode(ctx->vbi, ctx->sliced, lines, (double)pts/90000.0);
|
||||||
ctx->lines_processed += lines;
|
ctx->lines_processed += lines;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
ctx->pts = AV_NOPTS_VALUE;
|
||||||
ctx->pts = AV_NOPTS_VALUE;
|
ret = pkt->size;
|
||||||
ret = pkt->size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// is there a subtitle to pass?
|
// is there a subtitle to pass?
|
||||||
|
Loading…
Reference in New Issue
Block a user