Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
bf8706f5
Commit
bf8706f5
authored
Oct 20, 2010
by
Simon Morlat
Browse files
fix crash when x11 window is too small, and improve Xv detection in configure script
parent
e3a50ec4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
acinclude.m4
acinclude.m4
+5
-2
src/layouts.h
src/layouts.h
+2
-0
src/x11video.c
src/x11video.c
+4
-0
No files found.
acinclude.m4
View file @
bf8706f5
...
...
@@ -152,13 +152,16 @@ AC_DEFUN([MS_CHECK_VIDEO],[
esac],[enable_xv=true])
if test "$enable_xv" = "true"; then
AC_CHECK_HEADERS(X11/extensions/Xv.h,[] ,[enable_xv=false])
AC_CHECK_HEADERS(X11/extensions/Xv.h,[] ,[enable_xv=false])
AC_CHECK_HEADERS(X11/extensions/Xvlib.h,[] ,[enable_xv=false],[
#include <X11/Xlib.h>
])
AC_CHECK_LIB(Xv,XvCreateImage,[LIBS="$LIBS -lXv"])
fi
fi
if ! test "$mingw_found" = "yes" ; then
if test "$enable_xv$sdl_found" == "
nono
" ; then
if test "$enable_xv$sdl_found" == "
falsefalse
" ; then
AC_MSG_ERROR([No video output API found. Install either X11+Xv headers or SDL library.])
fi
fi
...
...
src/layouts.h
View file @
bf8706f5
...
...
@@ -26,6 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern
"C"
{
#endif
#define MS_LAYOUT_MIN_SIZE 40
void
ms_layout_compute
(
MSVideoSize
wsize
,
MSVideoSize
vsize
,
MSVideoSize
orig_psize
,
int
localrect_pos
,
float
scalefactor
,
MSRect
*
mainrect
,
MSRect
*
localrect
);
...
...
src/x11video.c
View file @
bf8706f5
...
...
@@ -181,6 +181,10 @@ static void x11video_prepare(MSFilter *f){
}
XGetWindowAttributes
(
s
->
display
,
s
->
window_id
,
&
wa
);
ms_message
(
"Window has size %i,%i"
,
wa
.
width
,
wa
.
height
);
if
(
wa
.
width
<
MS_LAYOUT_MIN_SIZE
||
wa
.
height
<
MS_LAYOUT_MIN_SIZE
){
return
;
}
s
->
fbuf
.
w
=
wa
.
width
&
~
0x1
;
s
->
fbuf
.
h
=
wa
.
height
&
~
0x1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment