Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-12-20 05:36:52 +0400
committerClément Bœsch <ubitux@gmail.com>2012-12-20 19:13:53 +0400
commit217bdd08e347cd170efa488e9ab0f4895d2b103a (patch)
tree9f98bffa7f7fc893123fd6f8f9b382c1a93d4f81 /libavformat/srtdec.c
parent6c26fc770436d485a261d2088a28fe0148ab90f3 (diff)
lavf/srtdec: reindent after previous commits.
Diffstat (limited to 'libavformat/srtdec.c')
-rw-r--r--libavformat/srtdec.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index 92ac8dbba9..0af3714196 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -139,39 +139,39 @@ static int srt_read_header(AVFormatContext *s)
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
while (!url_feof(s->pb)) {
- read_chunk(s->pb, &buf);
-
- if (buf.len) {
- int64_t pos = avio_tell(s->pb);
- int64_t pts;
- int duration;
- const char *ptr = buf.str;
- int32_t x1 = -1, y1 = -1, x2 = -1, y2 = -1;
- AVPacket *sub;
-
- pts = get_pts(&ptr, &duration, &x1, &y1, &x2, &y2);
- if (pts != AV_NOPTS_VALUE) {
- int len = buf.len - (ptr - buf.str);
- sub = ff_subtitles_queue_insert(&srt->q, ptr, len, 0);
- if (!sub) {
- res = AVERROR(ENOMEM);
- goto end;
- }
- sub->pos = pos;
- sub->pts = pts;
- sub->duration = duration;
- if (x1 != -1) {
- uint8_t *p = av_packet_new_side_data(sub, AV_PKT_DATA_SUBTITLE_POSITION, 16);
- if (p) {
- AV_WL32(p, x1);
- AV_WL32(p + 4, y1);
- AV_WL32(p + 8, x2);
- AV_WL32(p + 12, y2);
+ read_chunk(s->pb, &buf);
+
+ if (buf.len) {
+ int64_t pos = avio_tell(s->pb);
+ int64_t pts;
+ int duration;
+ const char *ptr = buf.str;
+ int32_t x1 = -1, y1 = -1, x2 = -1, y2 = -1;
+ AVPacket *sub;
+
+ pts = get_pts(&ptr, &duration, &x1, &y1, &x2, &y2);
+ if (pts != AV_NOPTS_VALUE) {
+ int len = buf.len - (ptr - buf.str);
+ sub = ff_subtitles_queue_insert(&srt->q, ptr, len, 0);
+ if (!sub) {
+ res = AVERROR(ENOMEM);
+ goto end;
+ }
+ sub->pos = pos;
+ sub->pts = pts;
+ sub->duration = duration;
+ if (x1 != -1) {
+ uint8_t *p = av_packet_new_side_data(sub, AV_PKT_DATA_SUBTITLE_POSITION, 16);
+ if (p) {
+ AV_WL32(p, x1);
+ AV_WL32(p + 4, y1);
+ AV_WL32(p + 8, x2);
+ AV_WL32(p + 12, y2);
+ }
}
}
}
}
- }
ff_subtitles_queue_finalize(&srt->q);