lavf/srtdec: reindent after previous commits.

This commit is contained in:
Clément Bœsch 2012-12-20 02:36:52 +01:00
parent 6c26fc7704
commit 217bdd08e3
1 changed files with 27 additions and 27 deletions

View File

@ -139,39 +139,39 @@ static int srt_read_header(AVFormatContext *s)
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED); av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
while (!url_feof(s->pb)) { while (!url_feof(s->pb)) {
read_chunk(s->pb, &buf); read_chunk(s->pb, &buf);
if (buf.len) { if (buf.len) {
int64_t pos = avio_tell(s->pb); int64_t pos = avio_tell(s->pb);
int64_t pts; int64_t pts;
int duration; int duration;
const char *ptr = buf.str; const char *ptr = buf.str;
int32_t x1 = -1, y1 = -1, x2 = -1, y2 = -1; int32_t x1 = -1, y1 = -1, x2 = -1, y2 = -1;
AVPacket *sub; AVPacket *sub;
pts = get_pts(&ptr, &duration, &x1, &y1, &x2, &y2); pts = get_pts(&ptr, &duration, &x1, &y1, &x2, &y2);
if (pts != AV_NOPTS_VALUE) { if (pts != AV_NOPTS_VALUE) {
int len = buf.len - (ptr - buf.str); int len = buf.len - (ptr - buf.str);
sub = ff_subtitles_queue_insert(&srt->q, ptr, len, 0); sub = ff_subtitles_queue_insert(&srt->q, ptr, len, 0);
if (!sub) { if (!sub) {
res = AVERROR(ENOMEM); res = AVERROR(ENOMEM);
goto end; goto end;
} }
sub->pos = pos; sub->pos = pos;
sub->pts = pts; sub->pts = pts;
sub->duration = duration; sub->duration = duration;
if (x1 != -1) { if (x1 != -1) {
uint8_t *p = av_packet_new_side_data(sub, AV_PKT_DATA_SUBTITLE_POSITION, 16); uint8_t *p = av_packet_new_side_data(sub, AV_PKT_DATA_SUBTITLE_POSITION, 16);
if (p) { if (p) {
AV_WL32(p, x1); AV_WL32(p, x1);
AV_WL32(p + 4, y1); AV_WL32(p + 4, y1);
AV_WL32(p + 8, x2); AV_WL32(p + 8, x2);
AV_WL32(p + 12, y2); AV_WL32(p + 12, y2);
}
} }
} }
} }
} }
}
ff_subtitles_queue_finalize(&srt->q); ff_subtitles_queue_finalize(&srt->q);