summaryrefslogtreecommitdiffstats
path: root/demux/stheader.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-12-16 23:54:25 +0100
committerwm4 <wm4@nowhere>2015-12-17 01:17:23 +0100
commit74c11f0c841d0b81a6ea759c7eb131d2c2e02ec3 (patch)
tree8c88229f881d63d3bb1504db7ca72583ae5eafcf /demux/stheader.h
parente798cf1ff64527cd2ed9fc3bab8dbc2d0c7a52de (diff)
downloadmpv-74c11f0c841d0b81a6ea759c7eb131d2c2e02ec3.tar.bz2
mpv-74c11f0c841d0b81a6ea759c7eb131d2c2e02ec3.tar.xz
sub: detect charset in demuxer
Slightly simpler, and removes the need to pre-read all subtitle packets. This still does the subtitle charset conversion on the packet level (instead converting when parsing the file), so in theory this still could provide a way to change the charset at runtime. But maybe even this should be removed, as FFmpeg is somewhat likely to get its own charset detection and conversion mechanism in the future. (Would have to keep the subtitle file in memory to allow changing the charset on the fly, I guess.)
Diffstat (limited to 'demux/stheader.h')
-rw-r--r--demux/stheader.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/stheader.h b/demux/stheader.h
index a615867685..7a11832c24 100644
--- a/demux/stheader.h
+++ b/demux/stheader.h
@@ -93,7 +93,7 @@ typedef struct sh_video {
typedef struct sh_sub {
double frame_based; // timestamps are frame-based (and this is the
// fallback framerate used for timestamps)
- bool is_utf8; // if false, subtitle packet charset is unknown
+ char *charset; // assumed 8 bit subtitle charset (can be NULL)
struct dec_sub *dec_sub; // decoder context
} sh_sub_t;