[FFmpeg-devel] [PATCH 2/3] lavf/srtdec: do not put line break event separator into packet.

Clément Bœsch ubitux at gmail.com
Tue Nov 20 22:39:59 CET 2012


On Sun, Nov 18, 2012 at 03:18:11PM +0100, Nicolas George wrote:
> Le primidi 21 brumaire, an CCXXI, Clément Bœsch a écrit :
> > The muxer add them automatically, so this avoid having a bunch of line
> > breaks all over the output files. One '\n' is still kept/added for two
> > reasons:
> >  - that line break can be considered part of the subtitle event, while
> >    the second one (which is now trimmed) is an event separator.
> 
> For the same script, the srt demuxer produces:
> 
> 00000000: 5468 6973 2069 7320 610a 7465 7374 2e0a  This is a.test..
> 
> while the matroska demuxer on top of mkvmerge produces:
> 
> 00000000: 5468 6973 2069 7320 610d 0a74 6573 742e  This is a..test.
> 
> so this is still inconsistent. Slightly worse: srtdec+streamcopy+matroskaenc
> produces a file with that packet:
> 
> 00000000: 5468 6973 2069 7320 610a 7465 7374 2e0a  This is a.test..
> 
> This is inconsistent with mkvmerge's behaviour. The Matroska spec does not
> specify things accurately enough to know whether it is acceptable, but
> ultimately I would rather have something consistent. I am not sure about
> whose task it would be to transform CRLF into/from LF, but I really believe
> that the final newline does not in the packet.
> 

I dropped that reason and kept only the second one in the commit
description.

> 
> Still, your patch improves things compared to the current situation
> (multiple final newlines), and makes things easier to fix in the future, so
> I guess it would be ok.
> 

Added a detailed FIXME above that line, and pushed.

Thanks.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121120/95e311aa/attachment.asc>


More information about the ffmpeg-devel mailing list