1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-22 23:02:37 +00:00

core: minor cleanups

Enable printf format warnings for set_osd_[t]msg.
Remove the pointless assertion in mplayer.c (the assertion proved that
the following NULL check is probably pointless, but leave that check
anyway for robustness - it's not really clear whether it's needed).
This commit is contained in:
wm4 2012-11-20 17:23:17 +01:00
parent 2cdbaaf31c
commit ef75d0ff26
2 changed files with 4 additions and 3 deletions

View File

@ -19,6 +19,8 @@
#ifndef MPLAYER_MP_OSD_H #ifndef MPLAYER_MP_OSD_H
#define MPLAYER_MP_OSD_H #define MPLAYER_MP_OSD_H
#include "compat/compiler.h"
#define OSD_MSG_TEXT 1 #define OSD_MSG_TEXT 1
#define OSD_MSG_SUB_DELAY 2 #define OSD_MSG_SUB_DELAY 2
#define OSD_MSG_SPEED 3 #define OSD_MSG_SPEED 3
@ -38,8 +40,8 @@
struct MPContext; struct MPContext;
void set_osd_bar(struct MPContext *mpctx, int type,const char* name,double min,double max,double val); void set_osd_bar(struct MPContext *mpctx, int type,const char* name,double min,double max,double val);
void set_osd_msg(struct MPContext *mpctx, int id, int level, int time, const char* fmt, ...); void set_osd_msg(struct MPContext *mpctx, int id, int level, int time, const char* fmt, ...) PRINTF_ATTRIBUTE(5,6);
void set_osd_tmsg(struct MPContext *mpctx, int id, int level, int time, const char* fmt, ...); void set_osd_tmsg(struct MPContext *mpctx, int id, int level, int time, const char* fmt, ...) PRINTF_ATTRIBUTE(5,6);
void rm_osd_msg(struct MPContext *mpctx, int id); void rm_osd_msg(struct MPContext *mpctx, int id);
// osd_function is the symbol appearing in the video status, such as OSD_PLAY // osd_function is the symbol appearing in the video status, such as OSD_PLAY

View File

@ -1474,7 +1474,6 @@ static void add_seek_osd_messages(struct MPContext *mpctx)
"Chapter: %s", chapter); "Chapter: %s", chapter);
talloc_free(chapter); talloc_free(chapter);
} }
assert(mpctx->master_demuxer);
if ((mpctx->add_osd_seek_info & OSD_SEEK_INFO_EDITION) if ((mpctx->add_osd_seek_info & OSD_SEEK_INFO_EDITION)
&& mpctx->master_demuxer) && mpctx->master_demuxer)
{ {