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

Nicolas George nicolas.george at normalesup.org
Sun Nov 18 15:18:11 CET 2012


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.


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.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121118/89bd98ba/attachment.asc>


More information about the ffmpeg-devel mailing list