Lines Matching defs:buf
36 char buf[64], *pbuf;
39 ff_text_init_buf(&tr, p->buf, p->buf_size);
48 if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0 ||
49 strtol(buf, &pbuf, 10) < 0 || pbuf == buf)
53 if (ff_subtitles_read_line(&tr, buf, sizeof(buf)) < 0)
55 pbuf = buf;
56 if (buf[0] == '-')
58 if (pbuf[0] >= '0' && pbuf[0] <= '9' && strstr(buf, " --> ")
59 && sscanf(buf, "%*d:%*d:%*d%*1[,.]%*d --> %*d:%*d:%*d%*1[,.]%d", &v) == 1)
94 static int add_event(FFDemuxSubtitlesQueue *q, AVBPrint *buf, char *line_cache,
98 av_bprintf(buf, "%s\n", line_cache);
101 while (buf->len > 0 && buf->str[buf->len - 1] == '\n')
102 buf->str[--buf->len] = 0;
104 if (buf->len) {
105 AVPacket *sub = ff_subtitles_queue_insert(q, buf->str, buf->len, 0);
108 av_bprint_clear(buf);
129 AVBPrint buf;
144 av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
168 av_bprintf(&buf, "%s\n", line_cache);
177 av_bprintf(&buf, "%s\n", line);
187 res = add_event(&srt->q, &buf, line_cache, &ei, !buf.len && !standalone_number);
202 res = add_event(&srt->q, &buf, line_cache, &ei, 1);
210 av_bprint_finalize(&buf, NULL);