comparison mplayer.c @ 36146:5950fc0d4b53

Allow parsing arbitrary files as playlist only if explicitly enabled.
author reimar
date Sun, 05 May 2013 17:02:33 +0000
parents 1562f350e8d2
children 428bd1b127bd
comparison
equal deleted inserted replaced
36145:47edff322a99 36146:5950fc0d4b53
328 #ifdef CONFIG_CRASH_DEBUG 328 #ifdef CONFIG_CRASH_DEBUG
329 static char *prog_path; 329 static char *prog_path;
330 static int crash_debug; 330 static int crash_debug;
331 #endif 331 #endif
332 332
333 static int allow_playlist_parsing;
334
333 /* This header requires all the global variable declarations. */ 335 /* This header requires all the global variable declarations. */
334 #include "cfg-mplayer.h" 336 #include "cfg-mplayer.h"
335 337
336 const void *mpctx_get_video_out(MPContext *mpctx) 338 const void *mpctx_get_video_out(MPContext *mpctx)
337 { 339 {
3243 play_tree_t *entry; 3245 play_tree_t *entry;
3244 // Handle playlist 3246 // Handle playlist
3245 current_module = "handle_playlist"; 3247 current_module = "handle_playlist";
3246 mp_msg(MSGT_CPLAYER, MSGL_V, "Parsing playlist %s...\n", 3248 mp_msg(MSGT_CPLAYER, MSGL_V, "Parsing playlist %s...\n",
3247 filename_recode(filename)); 3249 filename_recode(filename));
3248 entry = parse_playtree(mpctx->stream, use_gui); 3250 if (allow_playlist_parsing) {
3249 mpctx->eof = playtree_add_playlist(entry); 3251 entry = parse_playtree(mpctx->stream, use_gui);
3252 mpctx->eof = playtree_add_playlist(entry);
3253 } else {
3254 mp_msg(MSGT_CPLAYER, MSGL_ERR, "Playlist parsing disabled for security reasons. Ignoring file.\n");
3255 }
3250 goto goto_next_file; 3256 goto goto_next_file;
3251 } 3257 }
3252 mpctx->stream->start_pos += seek_to_byte; 3258 mpctx->stream->start_pos += seek_to_byte;
3253 3259
3254 if (stream_dump_type == 5) { 3260 if (stream_dump_type == 5) {