mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-23 19:38:51 +08:00
demux_mkv: never warn when trying to resync on EOF
If this happens, the file is actually broken, but the assumption is
simply that the file was truncated, and printing a warning would be
strange.
(cherry picked from commit 112d9aeda1)
This commit is contained in:
committed by
Diogo Franco (Kovensky)
parent
9e99a0c8b9
commit
2b737f8bfc
+4
-2
@@ -228,8 +228,10 @@ int ebml_resync_cluster(struct mp_log *log, stream_t *s)
|
||||
{
|
||||
int64_t pos = stream_tell(s);
|
||||
uint32_t last_4_bytes = 0;
|
||||
mp_err(log, "Corrupt file detected. "
|
||||
"Trying to resync starting from position %"PRId64"...\n", pos);
|
||||
if (!s->eof) {
|
||||
mp_err(log, "Corrupt file detected. "
|
||||
"Trying to resync starting from position %"PRId64"...\n", pos);
|
||||
}
|
||||
while (!s->eof) {
|
||||
// Assumes MATROSKA_ID_CLUSTER is 4 bytes, with no 0 bytes.
|
||||
if (last_4_bytes == MATROSKA_ID_CLUSTER) {
|
||||
|
||||
Reference in New Issue
Block a user