[MPlayer-cvslog] r30500 - trunk/libmpdemux/demux_lavf.c
reimar
subversion at mplayerhq.hu
Wed Feb 3 23:36:47 CET 2010
Author: reimar
Date: Wed Feb 3 23:36:47 2010
New Revision: 30500
Log:
Replace incorrect usage of strncpy.
Modified:
trunk/libmpdemux/demux_lavf.c
Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c Wed Feb 3 23:33:35 2010 (r30499)
+++ trunk/libmpdemux/demux_lavf.c Wed Feb 3 23:36:47 2010 (r30500)
@@ -37,6 +37,7 @@
#include "libavformat/avformat.h"
#include "libavformat/avio.h"
#include "libavutil/avutil.h"
+#include "libavutil/avstring.h"
#include "libavcodec/opt.h"
#include "mp_taglists.h"
@@ -462,11 +463,11 @@ static demuxer_t* demux_open_lavf(demuxe
if(demuxer->stream->url) {
if (!strncmp(demuxer->stream->url, "ffmpeg://rtsp:", 14))
- strncpy(mp_filename, demuxer->stream->url + 9, sizeof(mp_filename)-3);
+ av_strlcpy(mp_filename, demuxer->stream->url + 9, sizeof(mp_filename));
else
- strncpy(mp_filename + 3, demuxer->stream->url, sizeof(mp_filename)-3);
+ av_strlcat(mp_filename, demuxer->stream->url, sizeof(mp_filename));
} else
- strncpy(mp_filename + 3, "foobar.dummy", sizeof(mp_filename)-3);
+ av_strlcat(mp_filename, "foobar.dummy", sizeof(mp_filename));
priv->pb = av_alloc_put_byte(priv->buffer, BIO_BUFFER_SIZE, 0,
demuxer->stream, mp_read, NULL, mp_seek);
More information about the MPlayer-cvslog
mailing list