Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
af924fd9
Commit
af924fd9
authored
Sep 10, 2015
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/subtitles: forward log context in ff_subtitles_queue_finalize() for logging
parent
a634649a
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
24 additions
and
25 deletions
+24
-25
aqtitledec.c
libavformat/aqtitledec.c
+1
-1
assdec.c
libavformat/assdec.c
+1
-1
jacosubdec.c
libavformat/jacosubdec.c
+1
-1
lrcdec.c
libavformat/lrcdec.c
+1
-1
microdvddec.c
libavformat/microdvddec.c
+1
-1
mpeg.c
libavformat/mpeg.c
+1
-1
mpl2dec.c
libavformat/mpl2dec.c
+1
-1
mpsubdec.c
libavformat/mpsubdec.c
+1
-1
pjsdec.c
libavformat/pjsdec.c
+1
-1
realtextdec.c
libavformat/realtextdec.c
+1
-1
samidec.c
libavformat/samidec.c
+1
-1
srtdec.c
libavformat/srtdec.c
+1
-1
stldec.c
libavformat/stldec.c
+1
-1
subtitles.c
libavformat/subtitles.c
+5
-6
subtitles.h
libavformat/subtitles.h
+1
-1
subviewer1dec.c
libavformat/subviewer1dec.c
+1
-1
subviewerdec.c
libavformat/subviewerdec.c
+1
-1
tedcaptionsdec.c
libavformat/tedcaptionsdec.c
+1
-1
vplayerdec.c
libavformat/vplayerdec.c
+1
-1
webvttdec.c
libavformat/webvttdec.c
+1
-1
No files found.
libavformat/aqtitledec.c
View file @
af924fd9
...
...
@@ -95,7 +95,7 @@ static int aqt_read_header(AVFormatContext *s)
}
}
ff_subtitles_queue_finalize
(
&
aqt
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
aqt
->
q
);
return
0
;
}
...
...
libavformat/assdec.c
View file @
af924fd9
...
...
@@ -152,7 +152,7 @@ static int ass_read_header(AVFormatContext *s)
if
(
res
<
0
)
goto
end
;
ff_subtitles_queue_finalize
(
&
ass
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
ass
->
q
);
end:
av_bprint_finalize
(
&
header
,
NULL
);
...
...
libavformat/jacosubdec.c
View file @
af924fd9
...
...
@@ -240,7 +240,7 @@ static int jacosub_read_header(AVFormatContext *s)
AVPacket
*
sub
=
&
jacosub
->
q
.
subs
[
i
];
read_ts
(
jacosub
,
sub
->
data
,
&
sub
->
pts
,
&
sub
->
duration
);
}
ff_subtitles_queue_finalize
(
&
jacosub
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
jacosub
->
q
);
return
0
;
fail:
...
...
libavformat/lrcdec.c
View file @
af924fd9
...
...
@@ -210,7 +210,7 @@ static int lrc_read_header(AVFormatContext *s)
}
}
}
ff_subtitles_queue_finalize
(
&
lrc
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
lrc
->
q
);
ff_metadata_conv_ctx
(
s
,
NULL
,
ff_lrc_metadata_conv
);
return
0
;
}
...
...
libavformat/microdvddec.c
View file @
af924fd9
...
...
@@ -141,7 +141,7 @@ static int microdvd_read_header(AVFormatContext *s)
sub
->
pts
=
get_pts
(
line
);
sub
->
duration
=
get_duration
(
line
);
}
ff_subtitles_queue_finalize
(
&
microdvd
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
microdvd
->
q
);
if
(
has_real_fps
)
{
/* export the FPS info only if set in the file */
microdvd
->
frame_rate
=
pts_info
;
...
...
libavformat/mpeg.c
View file @
af924fd9
...
...
@@ -857,7 +857,7 @@ static int vobsub_read_header(AVFormatContext *s)
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
vobsub
->
q
[
i
].
sort
=
SUB_SORT_POS_TS
;
ff_subtitles_queue_finalize
(
&
vobsub
->
q
[
i
]);
ff_subtitles_queue_finalize
(
s
,
&
vobsub
->
q
[
i
]);
}
if
(
!
av_bprint_is_complete
(
&
header
))
{
...
...
libavformat/mpl2dec.c
View file @
af924fd9
...
...
@@ -108,7 +108,7 @@ static int mpl2_read_header(AVFormatContext *s)
}
}
ff_subtitles_queue_finalize
(
&
mpl2
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
mpl2
->
q
);
return
res
;
}
...
...
libavformat/mpsubdec.c
View file @
af924fd9
...
...
@@ -103,7 +103,7 @@ static int mpsub_read_header(AVFormatContext *s)
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_SUBTITLE
;
st
->
codec
->
codec_id
=
AV_CODEC_ID_TEXT
;
ff_subtitles_queue_finalize
(
&
mpsub
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
mpsub
->
q
);
end:
av_bprint_finalize
(
&
buf
,
NULL
);
...
...
libavformat/pjsdec.c
View file @
af924fd9
...
...
@@ -100,7 +100,7 @@ static int pjs_read_header(AVFormatContext *s)
}
}
ff_subtitles_queue_finalize
(
&
pjs
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
pjs
->
q
);
return
res
;
}
...
...
libavformat/realtextdec.c
View file @
af924fd9
...
...
@@ -115,7 +115,7 @@ static int realtext_read_header(AVFormatContext *s)
}
av_bprint_clear
(
&
buf
);
}
ff_subtitles_queue_finalize
(
&
rt
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
rt
->
q
);
end:
av_bprint_finalize
(
&
buf
,
NULL
);
...
...
libavformat/samidec.c
View file @
af924fd9
...
...
@@ -105,7 +105,7 @@ static int sami_read_header(AVFormatContext *s)
if
(
res
<
0
)
goto
end
;
ff_subtitles_queue_finalize
(
&
sami
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
sami
->
q
);
end:
av_bprint_finalize
(
&
buf
,
NULL
);
...
...
libavformat/srtdec.c
View file @
af924fd9
...
...
@@ -134,7 +134,7 @@ static int srt_read_header(AVFormatContext *s)
}
}
ff_subtitles_queue_finalize
(
&
srt
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
srt
->
q
);
end:
av_bprint_finalize
(
&
buf
,
NULL
);
...
...
libavformat/stldec.c
View file @
af924fd9
...
...
@@ -104,7 +104,7 @@ static int stl_read_header(AVFormatContext *s)
sub
->
duration
=
duration
;
}
}
ff_subtitles_queue_finalize
(
&
stl
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
stl
->
q
);
return
0
;
}
static
int
stl_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
...
...
libavformat/subtitles.c
View file @
af924fd9
...
...
@@ -166,7 +166,7 @@ static int cmp_pkt_sub_pos_ts(const void *a, const void *b)
return
s1
->
pos
>
s2
->
pos
?
1
:
-
1
;
}
static
void
drop_dups
(
FFDemuxSubtitlesQueue
*
q
)
static
void
drop_dups
(
void
*
log_ctx
,
FFDemuxSubtitlesQueue
*
q
)
{
int
i
,
drop
=
0
;
...
...
@@ -189,13 +189,11 @@ static void drop_dups(FFDemuxSubtitlesQueue *q)
if
(
drop
)
{
q
->
nb_subs
-=
drop
;
// TODO: forward log context down here
av_log
(
NULL
,
AV_LOG_WARNING
,
"Dropping %d duplicated subtitle events
\n
"
,
drop
);
av_log
(
log_ctx
,
AV_LOG_WARNING
,
"Dropping %d duplicated subtitle events
\n
"
,
drop
);
}
}
void
ff_subtitles_queue_finalize
(
FFDemuxSubtitlesQueue
*
q
)
void
ff_subtitles_queue_finalize
(
void
*
log_ctx
,
FFDemuxSubtitlesQueue
*
q
)
{
int
i
;
...
...
@@ -205,7 +203,8 @@ void ff_subtitles_queue_finalize(FFDemuxSubtitlesQueue *q)
for
(
i
=
0
;
i
<
q
->
nb_subs
;
i
++
)
if
(
q
->
subs
[
i
].
duration
==
-
1
&&
i
<
q
->
nb_subs
-
1
)
q
->
subs
[
i
].
duration
=
q
->
subs
[
i
+
1
].
pts
-
q
->
subs
[
i
].
pts
;
drop_dups
(
q
);
drop_dups
(
log_ctx
,
q
);
}
int
ff_subtitles_queue_read_packet
(
FFDemuxSubtitlesQueue
*
q
,
AVPacket
*
pkt
)
...
...
libavformat/subtitles.h
View file @
af924fd9
...
...
@@ -121,7 +121,7 @@ AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q,
/**
* Set missing durations and sort subtitles by PTS, and then byte position.
*/
void
ff_subtitles_queue_finalize
(
FFDemuxSubtitlesQueue
*
q
);
void
ff_subtitles_queue_finalize
(
void
*
log_ctx
,
FFDemuxSubtitlesQueue
*
q
);
/**
* Generic read_packet() callback for subtitles demuxers using this queue
...
...
libavformat/subviewer1dec.c
View file @
af924fd9
...
...
@@ -86,7 +86,7 @@ static int subviewer1_read_header(AVFormatContext *s)
}
}
ff_subtitles_queue_finalize
(
&
subviewer1
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
subviewer1
->
q
);
return
0
;
}
...
...
libavformat/subviewerdec.c
View file @
af924fd9
...
...
@@ -153,7 +153,7 @@ static int subviewer_read_header(AVFormatContext *s)
}
}
ff_subtitles_queue_finalize
(
&
subviewer
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
subviewer
->
q
);
end:
av_bprint_finalize
(
&
header
,
NULL
);
...
...
libavformat/tedcaptionsdec.c
View file @
af924fd9
...
...
@@ -287,7 +287,7 @@ static av_cold int tedcaptions_read_header(AVFormatContext *avf)
ff_subtitles_queue_clean
(
&
tc
->
subs
);
return
ret
;
}
ff_subtitles_queue_finalize
(
&
tc
->
subs
);
ff_subtitles_queue_finalize
(
avf
,
&
tc
->
subs
);
for
(
i
=
0
;
i
<
tc
->
subs
.
nb_subs
;
i
++
)
tc
->
subs
.
subs
[
i
].
pts
+=
tc
->
start_time
;
...
...
libavformat/vplayerdec.c
View file @
af924fd9
...
...
@@ -90,7 +90,7 @@ static int vplayer_read_header(AVFormatContext *s)
}
}
ff_subtitles_queue_finalize
(
&
vplayer
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
vplayer
->
q
);
return
0
;
}
...
...
libavformat/webvttdec.c
View file @
af924fd9
...
...
@@ -161,7 +161,7 @@ static int webvtt_read_header(AVFormatContext *s)
SET_SIDE_DATA
(
settings
,
AV_PKT_DATA_WEBVTT_SETTINGS
);
}
ff_subtitles_queue_finalize
(
&
webvtt
->
q
);
ff_subtitles_queue_finalize
(
s
,
&
webvtt
->
q
);
end:
av_bprint_finalize
(
&
cue
,
NULL
);
...
...
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