Browse code

avformat/mov: Use sizeof(filename) instead of a literal number

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 21a53dd08dce7cc5b3fdf9c4826b4b74d8300ea0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2015/03/15 05:23:32
Showing 1 changed files
... ...
@@ -2392,9 +2392,9 @@ static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref,
2392 2392
             filename[src_path - src] = 0;
2393 2393
 
2394 2394
             for (i = 1; i < ref->nlvl_from; i++)
2395
-                av_strlcat(filename, "../", 1024);
2395
+                av_strlcat(filename, "../", sizeof(filename));
2396 2396
 
2397
-            av_strlcat(filename, ref->path + l + 1, 1024);
2397
+            av_strlcat(filename, ref->path + l + 1, sizeof(filename));
2398 2398
 
2399 2399
             if (!avio_open2(pb, filename, AVIO_FLAG_READ, int_cb, NULL))
2400 2400
                 return 0;