[MPlayer-dev-eng] [PATCHES] VOBsub cleanup

Clément Bœsch ubitux at gmail.com
Tue Jan 11 01:38:26 CET 2011


Hi,

I'm making some noise again: this time I'd like to remove the hacky vobsub
loading code in mplayer.c for a new clean function in subreader.c so I can
update my -sub-paths patch to make it work with vobsubs. A few questions
though:

1) Since subreader.c tends to "load" instead of "read" subtitles files,
   is it ok to rename it to something like subloader.c? I'm not only
   referring to my load_* functions, but even sub_read_* functions are not
   really reading, but much more loading subtitles using buffers…

2) load_vob_subtitle, just like the other hack, seems at the moment unable
   to load more than one subtitle at a time; can anyone confirm that? It
   seems not very problematic since there is generally a single vobsub
   file for multiple language but just to know :)

3) If this patch gets applied, I'll edit a bit my -sub-paths patch to
   allow vobsub to be loaded in specified directories, but it will only
   load the first find one (if you confirm (2)); it is fine?

4) VOBsub has a not-working-that-much RAR support; is it fine to drop it
   in case we move to FFmpeg decoders?

So more about the patches now:

  0001-Rename-strcpy_strip_ext-to-strcpy_strip_ext_lower.patch

  This patch just allows to strip extension from the file without
  lowercasing the name; I need it for the second patch.

  0002-Replace-hacky-vobsub-loading-with-a-new-clean-one.patch

  Two small notes about this patch before you ask:
  - I used a extern vobsub_name declaration instead of passing it as an
    argument to the function to be consistent with the sub_name use in
    load_subtitles.
  - I needed to move code to subreader.c to use subtitles strings helpers
    while "rewriting" it (just strcpy_strip_ext though).

Best regards,

-- 
Clément B.


More information about the MPlayer-dev-eng mailing list