Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
3d258696
Commit
3d258696
authored
Oct 19, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/ass: assume raw=0 in ff_ass_add_rect_bprint
parent
65639e6b
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
14 additions
and
14 deletions
+14
-14
ass.c
libavcodec/ass.c
+2
-2
ass.h
libavcodec/ass.h
+2
-2
jacosubdec.c
libavcodec/jacosubdec.c
+1
-1
microdvddec.c
libavcodec/microdvddec.c
+1
-1
movtextdec.c
libavcodec/movtextdec.c
+1
-1
mpl2dec.c
libavcodec/mpl2dec.c
+1
-1
realtextdec.c
libavcodec/realtextdec.c
+1
-1
samidec.c
libavcodec/samidec.c
+1
-1
srtdec.c
libavcodec/srtdec.c
+1
-1
subviewerdec.c
libavcodec/subviewerdec.c
+1
-1
textdec.c
libavcodec/textdec.c
+1
-1
webvttdec.c
libavcodec/webvttdec.c
+1
-1
No files found.
libavcodec/ass.c
View file @
3d258696
...
@@ -175,11 +175,11 @@ err:
...
@@ -175,11 +175,11 @@ err:
}
}
int
ff_ass_add_rect_bprint
(
AVSubtitle
*
sub
,
const
AVBPrint
*
buf
,
int
ff_ass_add_rect_bprint
(
AVSubtitle
*
sub
,
const
AVBPrint
*
buf
,
int
ts_start
,
int
duration
,
int
raw
)
int
ts_start
,
int
duration
)
{
{
if
(
!
av_bprint_is_complete
(
buf
))
if
(
!
av_bprint_is_complete
(
buf
))
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
return
ff_ass_add_rect
(
sub
,
buf
->
str
,
ts_start
,
duration
,
raw
);
return
ff_ass_add_rect
(
sub
,
buf
->
str
,
ts_start
,
duration
,
0
);
}
}
void
ff_ass_bprint_text_event
(
AVBPrint
*
buf
,
const
char
*
p
,
int
size
,
void
ff_ass_bprint_text_event
(
AVBPrint
*
buf
,
const
char
*
p
,
int
size
,
...
...
libavcodec/ass.h
View file @
3d258696
...
@@ -93,10 +93,10 @@ int ff_ass_add_rect(AVSubtitle *sub, const char *dialog,
...
@@ -93,10 +93,10 @@ 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
* Same as ff_ass_add_rect_bprint, but taking an AVBPrint buffer instead of a
* string.
* string
, and assuming raw=0
.
*/
*/
int
ff_ass_add_rect_bprint
(
AVSubtitle
*
sub
,
const
AVBPrint
*
buf
,
int
ff_ass_add_rect_bprint
(
AVSubtitle
*
sub
,
const
AVBPrint
*
buf
,
int
ts_start
,
int
duration
,
int
raw
);
int
ts_start
,
int
duration
);
/**
/**
* Add an ASS dialog line to an AVBPrint buffer.
* Add an ASS dialog line to an AVBPrint buffer.
...
...
libavcodec/jacosubdec.c
View file @
3d258696
...
@@ -185,7 +185,7 @@ static int jacosub_decode_frame(AVCodecContext *avctx,
...
@@ -185,7 +185,7 @@ static int jacosub_decode_frame(AVCodecContext *avctx,
av_bprint_init
(
&
buffer
,
JSS_MAX_LINESIZE
,
JSS_MAX_LINESIZE
);
av_bprint_init
(
&
buffer
,
JSS_MAX_LINESIZE
,
JSS_MAX_LINESIZE
);
jacosub_to_ass
(
avctx
,
&
buffer
,
ptr
);
jacosub_to_ass
(
avctx
,
&
buffer
,
ptr
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buffer
,
avpkt
->
pts
,
avpkt
->
duration
,
0
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buffer
,
avpkt
->
pts
,
avpkt
->
duration
);
av_bprint_finalize
(
&
buffer
,
NULL
);
av_bprint_finalize
(
&
buffer
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
...
libavcodec/microdvddec.c
View file @
3d258696
...
@@ -298,7 +298,7 @@ static int microdvd_decode_frame(AVCodecContext *avctx,
...
@@ -298,7 +298,7 @@ static int microdvd_decode_frame(AVCodecContext *avctx,
av_rescale_q
(
duration
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
})
:
-
1
;
av_rescale_q
(
duration
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
})
:
-
1
;
av_bprintf
(
&
new_line
,
"
\r\n
"
);
av_bprintf
(
&
new_line
,
"
\r\n
"
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
new_line
,
ts_start
,
ts_duration
,
0
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
new_line
,
ts_start
,
ts_duration
);
av_bprint_finalize
(
&
new_line
,
NULL
);
av_bprint_finalize
(
&
new_line
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
...
libavcodec/movtextdec.c
View file @
3d258696
...
@@ -96,7 +96,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
...
@@ -96,7 +96,7 @@ static int mov_text_decode_frame(AVCodecContext *avctx,
// Note that the spec recommends lines be no longer than 2048 characters.
// Note that the spec recommends lines be no longer than 2048 characters.
av_bprint_init
(
&
buf
,
0
,
AV_BPRINT_SIZE_UNLIMITED
);
av_bprint_init
(
&
buf
,
0
,
AV_BPRINT_SIZE_UNLIMITED
);
text_to_ass
(
&
buf
,
ptr
,
end
);
text_to_ass
(
&
buf
,
ptr
,
end
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
ts_start
,
ts_end
-
ts_start
,
0
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
ts_start
,
ts_end
-
ts_start
);
av_bprint_finalize
(
&
buf
,
NULL
);
av_bprint_finalize
(
&
buf
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
...
libavcodec/mpl2dec.c
View file @
3d258696
...
@@ -76,7 +76,7 @@ static int mpl2_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -76,7 +76,7 @@ static int mpl2_decode_frame(AVCodecContext *avctx, void *data,
av_bprint_init
(
&
buf
,
0
,
AV_BPRINT_SIZE_UNLIMITED
);
av_bprint_init
(
&
buf
,
0
,
AV_BPRINT_SIZE_UNLIMITED
);
if
(
ptr
&&
avpkt
->
size
>
0
&&
*
ptr
&&
!
mpl2_event_to_ass
(
&
buf
,
ptr
))
if
(
ptr
&&
avpkt
->
size
>
0
&&
*
ptr
&&
!
mpl2_event_to_ass
(
&
buf
,
ptr
))
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
ts_start
,
ts_duration
,
0
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
ts_start
,
ts_duration
);
av_bprint_finalize
(
&
buf
,
NULL
);
av_bprint_finalize
(
&
buf
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
...
libavcodec/realtextdec.c
View file @
3d258696
...
@@ -68,7 +68,7 @@ static int realtext_decode_frame(AVCodecContext *avctx,
...
@@ -68,7 +68,7 @@ static int realtext_decode_frame(AVCodecContext *avctx,
// note: no need to rescale pts & duration since they are in the same
// note: no need to rescale pts & duration since they are in the same
// timebase as ASS (1/100)
// timebase as ASS (1/100)
if
(
ptr
&&
avpkt
->
size
>
0
&&
!
rt_event_to_ass
(
&
buf
,
ptr
))
if
(
ptr
&&
avpkt
->
size
>
0
&&
!
rt_event_to_ass
(
&
buf
,
ptr
))
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
avpkt
->
pts
,
avpkt
->
duration
,
0
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
avpkt
->
pts
,
avpkt
->
duration
);
av_bprint_finalize
(
&
buf
,
NULL
);
av_bprint_finalize
(
&
buf
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
...
libavcodec/samidec.c
View file @
3d258696
...
@@ -122,7 +122,7 @@ static int sami_decode_frame(AVCodecContext *avctx,
...
@@ -122,7 +122,7 @@ static int sami_decode_frame(AVCodecContext *avctx,
int
ts_start
=
av_rescale_q
(
avpkt
->
pts
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
});
int
ts_start
=
av_rescale_q
(
avpkt
->
pts
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
});
int
ts_duration
=
avpkt
->
duration
!=
-
1
?
int
ts_duration
=
avpkt
->
duration
!=
-
1
?
av_rescale_q
(
avpkt
->
duration
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
})
:
-
1
;
av_rescale_q
(
avpkt
->
duration
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
})
:
-
1
;
int
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
sami
->
full
,
ts_start
,
ts_duration
,
0
);
int
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
sami
->
full
,
ts_start
,
ts_duration
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
}
}
...
...
libavcodec/srtdec.c
View file @
3d258696
...
@@ -217,7 +217,7 @@ static int srt_decode_frame(AVCodecContext *avctx,
...
@@ -217,7 +217,7 @@ static int srt_decode_frame(AVCodecContext *avctx,
(
AVRational
){
1
,
100
});
(
AVRational
){
1
,
100
});
srt_to_ass
(
avctx
,
&
buffer
,
avpkt
->
data
,
x1
,
y1
,
x2
,
y2
);
srt_to_ass
(
avctx
,
&
buffer
,
avpkt
->
data
,
x1
,
y1
,
x2
,
y2
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buffer
,
ts_start
,
ts_end
-
ts_start
,
0
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buffer
,
ts_start
,
ts_end
-
ts_start
);
av_bprint_finalize
(
&
buffer
,
NULL
);
av_bprint_finalize
(
&
buffer
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
...
libavcodec/subviewerdec.c
View file @
3d258696
...
@@ -59,7 +59,7 @@ static int subviewer_decode_frame(AVCodecContext *avctx,
...
@@ -59,7 +59,7 @@ static int subviewer_decode_frame(AVCodecContext *avctx,
// note: no need to rescale pts & duration since they are in the same
// note: no need to rescale pts & duration since they are in the same
// timebase as ASS (1/100)
// timebase as ASS (1/100)
if
(
ptr
&&
avpkt
->
size
>
0
&&
!
subviewer_event_to_ass
(
&
buf
,
ptr
))
if
(
ptr
&&
avpkt
->
size
>
0
&&
!
subviewer_event_to_ass
(
&
buf
,
ptr
))
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
avpkt
->
pts
,
avpkt
->
duration
,
0
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
avpkt
->
pts
,
avpkt
->
duration
);
av_bprint_finalize
(
&
buf
,
NULL
);
av_bprint_finalize
(
&
buf
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
...
...
libavcodec/textdec.c
View file @
3d258696
...
@@ -56,7 +56,7 @@ static int text_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -56,7 +56,7 @@ static int text_decode_frame(AVCodecContext *avctx, void *data,
av_bprint_init
(
&
buf
,
0
,
AV_BPRINT_SIZE_UNLIMITED
);
av_bprint_init
(
&
buf
,
0
,
AV_BPRINT_SIZE_UNLIMITED
);
if
(
ptr
&&
avpkt
->
size
>
0
&&
*
ptr
)
{
if
(
ptr
&&
avpkt
->
size
>
0
&&
*
ptr
)
{
ff_ass_bprint_text_event
(
&
buf
,
ptr
,
avpkt
->
size
,
text
->
linebreaks
,
text
->
keep_ass_markup
);
ff_ass_bprint_text_event
(
&
buf
,
ptr
,
avpkt
->
size
,
text
->
linebreaks
,
text
->
keep_ass_markup
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
ts_start
,
ts_duration
,
0
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
ts_start
,
ts_duration
);
}
}
av_bprint_finalize
(
&
buf
,
NULL
);
av_bprint_finalize
(
&
buf
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
...
libavcodec/webvttdec.c
View file @
3d258696
...
@@ -84,7 +84,7 @@ static int webvtt_decode_frame(AVCodecContext *avctx,
...
@@ -84,7 +84,7 @@ static int webvtt_decode_frame(AVCodecContext *avctx,
int
ts_start
=
av_rescale_q
(
avpkt
->
pts
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
});
int
ts_start
=
av_rescale_q
(
avpkt
->
pts
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
});
int
ts_duration
=
avpkt
->
duration
!=
-
1
?
int
ts_duration
=
avpkt
->
duration
!=
-
1
?
av_rescale_q
(
avpkt
->
duration
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
})
:
-
1
;
av_rescale_q
(
avpkt
->
duration
,
avctx
->
time_base
,
(
AVRational
){
1
,
100
})
:
-
1
;
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
ts_start
,
ts_duration
,
0
);
ret
=
ff_ass_add_rect_bprint
(
sub
,
&
buf
,
ts_start
,
ts_duration
);
}
}
av_bprint_finalize
(
&
buf
,
NULL
);
av_bprint_finalize
(
&
buf
,
NULL
);
if
(
ret
<
0
)
if
(
ret
<
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