diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-05 00:57:05 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-05 13:17:38 +0200 |
commit | 0d0fdb0ad59c0533fb91dad00379f762573ce541 (patch) | |
tree | 8096ce55f31d19ba827117b01efff3585c9b9f44 /libavdevice/sdl.c | |
parent | ba91bf58cd8bab4de55ec31ffcdf6cc71f7e5e42 (diff) | |
download | ffmpeg-0d0fdb0ad59c0533fb91dad00379f762573ce541.tar.gz |
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/sdl.c')
-rw-r--r-- | libavdevice/sdl.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 }, |