From d191de856486174faec188ad142ef3ff1b347bd4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 25 Sep 2014 23:38:23 +0200 Subject: stream_dvd: better .ifo probing stream_dvd.c includes a pseudo-protocol that recognizes .IFO files, and plays them using libdvdread. This was relatively lazy, and could perhaps easily trigger with files that just had the .ifo extension. Make the checks stricter, and even probe the file header. Apparently the first bytes in an .ifo file are always "DVDVIDEO-VTS", so check for this. Refuse to load the main "video_ts.ifo". The plan is to use stream_dvdnav for it. This also removes at least 1 memory leak. --- stream/stream.h | 1 + 1 file changed, 1 insertion(+) (limited to 'stream/stream.h') diff --git a/stream/stream.h b/stream/stream.h index 0f028e330d..28f9936fce 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -266,6 +266,7 @@ void mp_cancel_reset(struct mp_cancel *c); // stream_file.c char *mp_file_url_to_filename(void *talloc_ctx, bstr url); +char *mp_file_get_path(void *talloc_ctx, bstr url); void stream_print_proto_list(struct mp_log *log); -- cgit v1.2.3