[FFmpeg-devel] [PATCH 2/3] lavc: fix recoded subtitles end.

Clément Bœsch ubitux at gmail.com
Sun Apr 7 13:23:04 CEST 2013

On Sun, Apr 07, 2013 at 01:15:21PM +0200, Nicolas George wrote:
> L'octidi 18 germinal, an CCXXI, Clement Boesch a écrit :
> > Wouldn't if (outl) outpkt->data[outpkt->size] = '\0' enough to fix the
> > problem? The memset looks overkill. (note: if !outl, the zeroed padding
> > takes care of the ending).
> The API mandates zeroed padding at the end of the packet, as you say, the
> memset is there exactly for that.
> The memset could be FFMIN(outl, FF_INPUT_BUFFER_PADDING_SIZE), or even
> FF_INPUT_BUFFER_PADDING_SIZE alone, but I find this version more elegant,
> and the efficiency difference is irrelevant after calls to iconv.

OK, well I guess the patch is OK then. 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/20130407/a61302f7/attachment.asc>

More information about the ffmpeg-devel mailing list