summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index fe69a1a564..bd504de7b9 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -3816,8 +3816,7 @@ static int opt_streamid(const char *opt, const char *arg)
char *p;
char idx_str[16];
- strncpy(idx_str, arg, sizeof(idx_str));
- idx_str[sizeof(idx_str)-1] = '\0';
+ av_strlcpy(idx_str, arg, sizeof(idx_str));
p = strchr(idx_str, ':');
if (!p) {
fprintf(stderr,