Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
c669af0f
Commit
c669af0f
authored
Oct 19, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/ass: add ASS trailing \r\n in one single place
parent
3d258696
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
5 additions
and
12 deletions
+5
-12
ass.c
libavcodec/ass.c
+2
-2
ass.h
libavcodec/ass.h
+1
-1
jacosubdec.c
libavcodec/jacosubdec.c
+0
-1
libzvbi-teletextdec.c
libavcodec/libzvbi-teletextdec.c
+1
-0
microdvddec.c
libavcodec/microdvddec.c
+0
-1
movtextdec.c
libavcodec/movtextdec.c
+0
-1
mpl2dec.c
libavcodec/mpl2dec.c
+0
-1
realtextdec.c
libavcodec/realtextdec.c
+0
-1
samidec.c
libavcodec/samidec.c
+1
-1
srtdec.c
libavcodec/srtdec.c
+0
-1
subviewerdec.c
libavcodec/subviewerdec.c
+0
-1
webvttdec.c
libavcodec/webvttdec.c
+0
-1
No files found.
libavcodec/ass.c
View file @
c669af0f
...
...
@@ -174,9 +174,10 @@ err:
return
ret
;
}
int
ff_ass_add_rect_bprint
(
AVSubtitle
*
sub
,
const
AVBPrint
*
buf
,
int
ff_ass_add_rect_bprint
(
AVSubtitle
*
sub
,
AVBPrint
*
buf
,
int
ts_start
,
int
duration
)
{
av_bprintf
(
buf
,
"
\r\n
"
);
if
(
!
av_bprint_is_complete
(
buf
))
return
AVERROR
(
ENOMEM
);
return
ff_ass_add_rect
(
sub
,
buf
->
str
,
ts_start
,
duration
,
0
);
...
...
@@ -218,5 +219,4 @@ void ff_ass_bprint_text_event(AVBPrint *buf, const char *p, int size,
av_bprint_chars
(
buf
,
*
p
,
1
);
}
}
av_bprintf
(
buf
,
"
\r\n
"
);
}
libavcodec/ass.h
View file @
c669af0f
...
...
@@ -95,7 +95,7 @@ int ff_ass_add_rect(AVSubtitle *sub, const char *dialog,
* Same as ff_ass_add_rect_bprint, but taking an AVBPrint buffer instead of a
* string, and assuming raw=0.
*/
int
ff_ass_add_rect_bprint
(
AVSubtitle
*
sub
,
const
AVBPrint
*
buf
,
int
ff_ass_add_rect_bprint
(
AVSubtitle
*
sub
,
AVBPrint
*
buf
,
int
ts_start
,
int
duration
);
/**
...
...
libavcodec/jacosubdec.c
View file @
c669af0f
...
...
@@ -162,7 +162,6 @@ static void jacosub_to_ass(AVCodecContext *avctx, AVBPrint *dst, const char *src
if
(
i
==
FF_ARRAY_ELEMS
(
ass_codes_map
))
av_bprintf
(
dst
,
"%c"
,
*
src
++
);
}
av_bprintf
(
dst
,
"
\r\n
"
);
}
static
int
jacosub_decode_frame
(
AVCodecContext
*
avctx
,
...
...
libavcodec/libzvbi-teletextdec.c
View file @
c669af0f
...
...
@@ -101,6 +101,7 @@ static int create_ass_text(TeletextContext *ctx, const char *text, char **ass)
/* First we escape the plain text into buf. */
av_bprint_init
(
&
buf
,
0
,
AV_BPRINT_SIZE_UNLIMITED
);
ff_ass_bprint_text_event
(
&
buf
,
text
,
strlen
(
text
),
""
,
0
);
av_bprintf
(
&
buf
,
"
\r\n
"
);
if
(
!
av_bprint_is_complete
(
&
buf
))
{
av_bprint_finalize
(
&
buf
,
NULL
);
...
...
libavcodec/microdvddec.c
View file @
c669af0f
...
...
@@ -297,7 +297,6 @@ static int microdvd_decode_frame(AVCodecContext *avctx,
int
ts_duration
=
duration
!=
-
1
?
av_rescale_q
(
duration
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
})
:
-
1
;
av_bprintf
(
&
new_line
,
"
\r\n
"
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
new_line
,
ts_start
,
ts_duration
);
av_bprint_finalize
(
&
new_line
,
NULL
);
if
(
ret
<
0
)
...
...
libavcodec/movtextdec.c
View file @
c669af0f
...
...
@@ -42,7 +42,6 @@ static int text_to_ass(AVBPrint *buf, const char *text, const char *text_end)
text
++
;
}
av_bprintf
(
buf
,
"
\r\n
"
);
return
0
;
}
...
...
libavcodec/mpl2dec.c
View file @
c669af0f
...
...
@@ -59,7 +59,6 @@ static int mpl2_event_to_ass(AVBPrint *buf, const char *p)
}
}
av_bprintf
(
buf
,
"
\r\n
"
);
return
0
;
}
...
...
libavcodec/realtextdec.c
View file @
c669af0f
...
...
@@ -52,7 +52,6 @@ static int rt_event_to_ass(AVBPrint *buf, const char *p)
}
p
++
;
}
av_bprintf
(
buf
,
"
\r\n
"
);
return
0
;
}
...
...
libavcodec/samidec.c
View file @
c669af0f
...
...
@@ -104,7 +104,7 @@ static int sami_paragraph_to_ass(AVCodecContext *avctx, const char *src)
av_bprint_clear
(
&
sami
->
full
);
if
(
sami
->
source
.
len
)
av_bprintf
(
&
sami
->
full
,
"{
\\
i1}%s{
\\
i0}
\\
N"
,
sami
->
source
.
str
);
av_bprintf
(
&
sami
->
full
,
"%s
\r\n
"
,
sami
->
content
.
str
);
av_bprintf
(
&
sami
->
full
,
"%s"
,
sami
->
content
.
str
);
end:
av_free
(
dupsrc
);
...
...
libavcodec/srtdec.c
View file @
c669af0f
...
...
@@ -183,7 +183,6 @@ static void srt_to_ass(AVCodecContext *avctx, AVBPrint *dst,
dst
->
len
-=
2
;
dst
->
str
[
dst
->
len
]
=
0
;
rstrip_spaces_buf
(
dst
);
av_bprintf
(
dst
,
"
\r\n
"
);
}
static
int
srt_decode_frame
(
AVCodecContext
*
avctx
,
...
...
libavcodec/subviewerdec.c
View file @
c669af0f
...
...
@@ -43,7 +43,6 @@ static int subviewer_event_to_ass(AVBPrint *buf, const char *p)
}
}
av_bprintf
(
buf
,
"
\r\n
"
);
return
0
;
}
...
...
libavcodec/webvttdec.c
View file @
c669af0f
...
...
@@ -67,7 +67,6 @@ static int webvtt_event_to_ass(AVBPrint *buf, const char *p)
av_bprint_chars
(
buf
,
*
p
,
1
);
p
++
;
}
av_bprintf
(
buf
,
"
\r\n
"
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment