mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-27 05:49:38 +08:00
demux_mkv: use a more universal zero initializer
Unfortunately, we can't avoid this warning 100%, because ebml_info is
written by a Perl script. I think the script writes the struct fields in
random order (thanks Perl), so there's no way to know whether the first
struct field is a scalar or a struct.
At least {0} is always valid here, even if it shows a warning. (The
compilers are wrong, see e.g. [1].)
[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
This commit is contained in:
+1
-1
@@ -359,7 +359,7 @@ static int demux_mkv_read_info(demuxer_t *demuxer)
|
|||||||
mkv_d->tc_scale = 1000000;
|
mkv_d->tc_scale = 1000000;
|
||||||
mkv_d->duration = 0;
|
mkv_d->duration = 0;
|
||||||
|
|
||||||
struct ebml_info info = {{0}};
|
struct ebml_info info = {0};
|
||||||
struct ebml_parse_ctx parse_ctx = {0};
|
struct ebml_parse_ctx parse_ctx = {0};
|
||||||
if (ebml_read_element(s, &parse_ctx, &info, &ebml_info_desc) < 0)
|
if (ebml_read_element(s, &parse_ctx, &info, &ebml_info_desc) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user