Re: [FFmpeg-devel] [PATCH v2 6/6] avformat/subtitles: guess UTF-16 if no BOM present

2014-09-06 Thread Michael Niedermayer
On Sat, Sep 06, 2014 at 08:24:10AM +0200, Reimar Döffinger wrote: > On 06.09.2014, at 00:23, wm4 wrote: > > On Sat, 6 Sep 2014 00:00:10 +0200 > > Michael Niedermayer wrote: > > > >> On Thu, Sep 04, 2014 at 10:40:27PM +0200, wm4 wrote: > >>> --- > >>> Follows reimar's suggestion for detecting UTF

Re: [FFmpeg-devel] [PATCH v2 6/6] avformat/subtitles: guess UTF-16 if no BOM present

2014-09-05 Thread Reimar Döffinger
On 06.09.2014, at 00:23, wm4 wrote: > On Sat, 6 Sep 2014 00:00:10 +0200 > Michael Niedermayer wrote: > >> On Thu, Sep 04, 2014 at 10:40:27PM +0200, wm4 wrote: >>> --- >>> Follows reimar's suggestion for detecting UTF-16. If the detection goes >>> wrong, probing the format won't succeed, so this

Re: [FFmpeg-devel] [PATCH v2 6/6] avformat/subtitles: guess UTF-16 if no BOM present

2014-09-05 Thread wm4
On Sat, 6 Sep 2014 00:00:10 +0200 Michael Niedermayer wrote: > On Thu, Sep 04, 2014 at 10:40:27PM +0200, wm4 wrote: > > --- > > Follows reimar's suggestion for detecting UTF-16. If the detection goes > > wrong, probing the format won't succeed, so this should not break > > anything. > > > > > I

Re: [FFmpeg-devel] [PATCH v2 6/6] avformat/subtitles: guess UTF-16 if no BOM present

2014-09-05 Thread Michael Niedermayer
On Thu, Sep 04, 2014 at 10:40:27PM +0200, wm4 wrote: > --- > Follows reimar's suggestion for detecting UTF-16. If the detection goes > wrong, probing the format won't succeed, so this should not break > anything. > > I didn't use ffio_ensure_seekback), because this apparently reallocates > the bu

Re: [FFmpeg-devel] [PATCH v2 6/6] avformat/subtitles: guess UTF-16 if no BOM present

2014-09-05 Thread Clément Bœsch
On Thu, Sep 04, 2014 at 10:40:27PM +0200, wm4 wrote: > --- > Follows reimar's suggestion for detecting UTF-16. If the detection goes > wrong, probing the format won't succeed, so this should not break > anything. > > I didn't use ffio_ensure_seekback), because this apparently reallocates > the buf

[FFmpeg-devel] [PATCH v2 6/6] avformat/subtitles: guess UTF-16 if no BOM present

2014-09-04 Thread wm4
--- Follows reimar's suggestion for detecting UTF-16. If the detection goes wrong, probing the format won't succeed, so this should not break anything. I didn't use ffio_ensure_seekback), because this apparently reallocates the buffer - which we certainly don't want, because the probe API doesn't