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 | |
parent | ba91bf58cd8bab4de55ec31ffcdf6cc71f7e5e42 (diff) | |
download | ffmpeg-streaming-0d0fdb0ad59c0533fb91dad00379f762573ce541.zip ffmpeg-streaming-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')
-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 be56be4..e49e5b7 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 07f60cd..36f65f2 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 }, |