summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-14 14:05:22 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2011-01-15 18:45:43 +0200
commitac79632ded16b62e0abf10f1cd319fba20bc0024 (patch)
treea671e3fe3971917f2dbf066395b90598320b3df1 /mplayer.c
parente9022ec470e9334a6d0f3cb044027964ac4f63f6 (diff)
downloadmpv-ac79632ded16b62e0abf10f1cd319fba20bc0024.tar.bz2
mpv-ac79632ded16b62e0abf10f1cd319fba20bc0024.tar.xz
subtitles: remove code trying to handle text subs with libavcodec
The avsub implementation tries to fall back to MPlayer's other text subtitle decoding if libavcodec returns text as the 'decoded' subtitle. The code implementing this is buggy, and as far as I can see it should not be triggered normally (libavcodec decoding is only used for xvid, pgs and dvb subtitles, and for those libavcodec should return bitmaps). Remove the buggy code (don't try to support non-bitmap results) and simplify things a bit.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mplayer.c b/mplayer.c
index f36bb2788f..382fe2a6f5 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -1901,10 +1901,8 @@ void update_subtitles(struct MPContext *mpctx, double refpts,
if (d_sub->non_interleaved)
ds_get_next_pts(d_sub);
- int orig_type = type;
while (d_sub->first) {
double subpts = ds_get_next_pts(d_sub) + sub_offset;
- type = orig_type;
if (subpts > curpts) {
// Libass handled subs can be fed to it in advance
if (!opts->ass_enabled || !is_text_sub(type))
@@ -1917,10 +1915,9 @@ void update_subtitles(struct MPContext *mpctx, double refpts,
len = ds_get_packet_sub(d_sub, &packet);
if (is_av_sub(type)) {
#ifdef CONFIG_FFMPEG
- type = decode_avsub(d_sub->sh, &packet, &len, &subpts, &endpts);
- if (type <= 0)
+ decode_avsub(d_sub->sh, packet, len, subpts, endpts);
#endif
- continue;
+ continue;
}
if (type == 'm') {
if (len < 2) continue;