diff options
author | Stefano Sabatini | 2011-06-05 00:57:05 +0200 |
---|---|---|
committer | Stefano Sabatini | 2011-06-05 13:17:38 +0200 |
commit | 0d0fdb0ad59c0533fb91dad00379f762573ce541 (patch) | |
tree | 8096ce55f31d19ba827117b01efff3585c9b9f44 /libavdevice | |
parent | ba91bf58cd8bab4de55ec31ffcdf6cc71f7e5e42 (diff) |
sdl: use the filename for defining the window title, if not specified
This allows a more efficient use of the commandline.
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/avdevice.h | 2 | ||||
-rw-r--r-- | libavdevice/sdl.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libavdevice/avdevice.h b/libavdevice/avdevice.h index be56be48d7..e49e5b71f7 100644 --- a/libavdevice/avdevice.h +++ b/libavdevice/avdevice.h @@ -24,7 +24,7 @@ #define LIBAVDEVICE_VERSION_MAJOR 53 #define LIBAVDEVICE_VERSION_MINOR 1 -#define LIBAVDEVICE_VERSION_MICRO 0 +#define LIBAVDEVICE_VERSION_MICRO 1 #define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \ LIBAVDEVICE_VERSION_MINOR, \ diff --git a/libavdevice/sdl.c b/libavdevice/sdl.c index 07f60cd648..36f65f2395 100644 --- a/libavdevice/sdl.c +++ b/libavdevice/sdl.c @@ -78,6 +78,8 @@ static int sdl_write_header(AVFormatContext *s) float sar, dar; /* sample and display aspect ratios */ int i, ret; + if (!sdl->window_title) + sdl->window_title = av_strdup(s->filename); if (!sdl->icon_title) sdl->icon_title = av_strdup(sdl->window_title); @@ -201,7 +203,7 @@ static int sdl_write_packet(AVFormatContext *s, AVPacket *pkt) #define OFFSET(x) offsetof(SDLContext,x) static const AVOption options[] = { - { "window_title", "SDL window title", OFFSET(window_title), FF_OPT_TYPE_STRING, {.str = "SDL video outdev" }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, + { "window_title", "SDL window title", OFFSET(window_title), FF_OPT_TYPE_STRING, {.str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, { "icon_title", "SDL iconified window title", OFFSET(icon_title) , FF_OPT_TYPE_STRING, {.str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, { "window_size", "SDL window forced size", OFFSET(window_size) , FF_OPT_TYPE_STRING, {.str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, { NULL }, |