[FFmpeg-trac] #2431(avcodec:new): Detect if subtitle streams do not contain valid utf-8

FFmpeg trac at avcodec.org
Wed Apr 10 02:18:29 CEST 2013


#2431: Detect if subtitle streams do not contain valid utf-8
-------------------------------------+-----------------------------------
             Reporter:  Nick         |                    Owner:
                 Type:  enhancement  |                   Status:  new
             Priority:  wish         |                Component:  avcodec
              Version:  git-master   |               Resolution:
             Keywords:  sub srt      |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-----------------------------------

Comment (by Nick):

 Replying to [comment:24 cehoyos]:
 > Replying to [comment:23 Nick]:
 > > - ffmpeg/avcodec must be built with "'''--enable-iconv'''"
 >
 > This is not correct.

 You are sure?
 I mean the import of plaintext subtitle files using the subtitles
 character encoding conversion ('''-sub_charenc''').

 Looking in source "...\ffmpeg\libavcodec\utils.c":
 {{{
 #if CONFIG_ICONV
                     iconv_t cd = iconv_open("UTF-8", avctx->sub_charenc);
                     if (cd == (iconv_t)-1) {
                         av_log(avctx, AV_LOG_ERROR, "Unable to open iconv
 context "
                                "with input character encoding \"%s\"\n",
 avctx->sub_charenc);
                         ret = AVERROR(errno);
                         goto free_and_end;
                     }
                     iconv_close(cd);
 #else
                     av_log(avctx, AV_LOG_ERROR, "Character encoding
 subtitles "
                            "conversion needs a libavcodec built with iconv
 support "
                            "for this codec\n");
                     ret = AVERROR(ENOSYS);
                     goto free_and_end;
 #endif
 }}}
 ... and also in function recode_subtitle()

 '''"conversion needs a libavcodec built with iconv support for this
 codec\n"'''
 and
 where is iconv_open() and iconv_close() definied?

 (see also error message in
 [https://ffmpeg.org/trac/ffmpeg/ticket/2431#comment:14 comment:14])

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2431#comment:25>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list