mirror of
https://github.com/mpv-player/mpv
synced 2025-02-20 14:56:55 +00: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:
parent
dd344b43e8
commit
4aae1ff6de
@ -359,7 +359,7 @@ static int demux_mkv_read_info(demuxer_t *demuxer)
|
||||
mkv_d->tc_scale = 1000000;
|
||||
mkv_d->duration = 0;
|
||||
|
||||
struct ebml_info info = {{0}};
|
||||
struct ebml_info info = {0};
|
||||
struct ebml_parse_ctx parse_ctx = {0};
|
||||
if (ebml_read_element(s, &parse_ctx, &info, &ebml_info_desc) < 0)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user