[MPlayer-dev-eng] [PATCH] change aspect ratio in gtk gui

Stephen Sheldon sfsheldo at gmail.com
Mon Jul 8 00:09:56 CEST 2013


On 07/07/2013 02:00 PM, Ingo Brückl wrote:
> Stephen Sheldon wrote on Sun, 07 Jul 2013 12:36:13 -0700:
>
>> When I try to change the aspect ratio in the gtk gui, gmplayer often
>> crashes. [...]When it does work, it restarts the video. gnome-mplayer and
>> smplayer can change the aspect ratio of a running video on the fly. So can
>> the win32 gui. I compared what was happening in the two gui's, and came up
>> with this patch. I think the crash that you see changing aspect ratios is
>> really the crash that you see when you try to play a video again in the
>> same instance of gmplayer.
> I've never experienced any problems or even a crash with changing the aspect
> ratio. The GUI does it on the fly while playing without any restart.
>
> We should figure out why your version of the GUI behaves that strangely.
>
> Ingo

I am running Fedora 19 with the gmplayer from rpmfusion.

With -vo x11, things work as you describe.  With -vo xv, the video 
restarts.  With -vo gl, gmplayer crashes.

With my patch on r36350 all three cases change the aspect ratio on the 
fly and the video continues.

My GL problems are probably related to my fx5200 Nvidia card and nouveau.

Here is a back trace when I start a video with -vo gl, and try to start 
another one:

Program received signal SIGSEGV, Segmentation fault.
0x00007fffdad575a0 in nouveau_fence_next () from 
/usr/lib64/dri/nouveau_dri.so
Missing separate debuginfos, use: debuginfo-install 
mplayer-gui-1.1-8.20130416sv
n.fc19.x86_64
(gdb) bt
#0  0x00007fffdad575a0 in nouveau_fence_next ()
    from /usr/lib64/dri/nouveau_dri.so
#1  0x00007fffdac79b04 in nv30_context_kick_notify ()
    from /usr/lib64/dri/nouveau_dri.so
#2  0x00007fffda73fefc in pushbuf_submit.isra.4 ()
    from /lib64/libdrm_nouveau.so.2
#3  0x00007fffda74017e in pushbuf_flush () from /lib64/libdrm_nouveau.so.2
#4  0x00007fffda740c30 in nouveau_pushbuf_kick ()
    from /lib64/libdrm_nouveau.so.2
#5  0x00007fffdac79c43 in nv30_context_flush ()
    from /usr/lib64/dri/nouveau_dri.so
#6  0x00007fffdaabdf71 in st_finish () from /usr/lib64/dri/nouveau_dri.so
#7  0x00007fffdaabdfc0 in st_glFinish () from /usr/lib64/dri/nouveau_dri.so
#8  0x0000555555675e42 in setGlWindow_x11 (ctx=0x555556295240 <glctx>)
     at libvo/gl_common.c:2260
#9  0x000055555567d1f0 in config (width=<optimized out>,
     height=<optimized out>, d_width=320, d_height=240, flags=4,
     title=0x555555d4e333 "MPlayer", format=842094169) at libvo/vo_gl.c:703
#10 0x000055555566c89f in config_video_out (
     vo=0x555556170340 <video_out_gl_nosw>, width=width at entry=320,
     height=height at entry=240, d_width=d_width at entry=320,
     d_height=d_height at entry=240, flags=flags at entry=4,
     title=title at entry=0x555555d4e333 "MPlayer", 
format=format at entry=842094169)
---Type <return> to continue, or q <return> to quit---
     at libvo/video_out.c:390
#11 0x0000555555705e20 in config (vf=<optimized out>, width=320, 
height=240,
     d_width=320, d_height=240, flags=4, outfmt=842094169)
     at libmpcodecs/vf_vo.c:74
#12 0x00005555556dd925 in vf_config_wrapper (vf=0x5555570eed50,
     width=<optimized out>, height=<optimized out>, 
d_width=d_width at entry=320,
     d_height=d_height at entry=240, flags=flags at entry=4, outfmt=842094169)
     at libmpcodecs/vf.c:651
#13 0x00005555556daa3e in mpcodecs_config_vo (sh=sh at entry=0x555556ba9390,
     w=w at entry=320, h=h at entry=240, preferred_outfmt=<optimized out>)
     at libmpcodecs/vd.c:363
#14 0x00005555557a1a3f in init_vo (sh=sh at entry=0x555556ba9390,
     pix_fmt=<optimized out>) at libmpcodecs/vd_ffmpeg.c:550
#15 0x00005555557a25dc in get_buffer (avctx=0x5555570ef310, 
pic=0x555556e43670)
     at libmpcodecs/vd_ffmpeg.c:610
#16 0x0000555555b40e02 in get_buffer_internal (flags=1, 
frame=0x555556e43670,
     avctx=0x5555570ef310) at libavcodec/utils.c:731
#17 ff_get_buffer (avctx=avctx at entry=0x5555570ef310, frame=0x555556e43670,
     flags=flags at entry=1) at libavcodec/utils.c:842
#18 0x0000555555acac06 in thread_get_buffer_internal (flags=1,
     f=0x555556e438d8, f at entry=0x268, avctx=0x5555570ef310)
     at libavcodec/pthread.c:929
#19 ff_thread_get_buffer (avctx=0x5555570ef310, f=f at entry=0x555556e438d8,
---Type <return> to continue, or q <return> to quit---
     flags=1) at libavcodec/pthread.c:1010
#20 0x0000555555a8b804 in alloc_frame_buffer (pic=0x555556e43670,
     s=0x5555570ef740) at libavcodec/mpegvideo.c:234
#21 ff_alloc_picture (s=s at entry=0x5555570ef740, 
pic=pic at entry=0x555556e43670,
     shared=shared at entry=0) at libavcodec/mpegvideo.c:393
#22 0x0000555555a8d13b in ff_MPV_frame_start (s=s at entry=0x5555570ef740,
     avctx=avctx at entry=0x5555570ef310) at libavcodec/mpegvideo.c:1551
#23 0x000055555597a66c in ff_h263_decode_frame (avctx=0x5555570ef310,
     data=0x5555570ef0a0, got_frame=0x7fffffffcc64, avpkt=<optimized out>)
     at libavcodec/h263dec.c:649
#24 0x0000555555b423c6 in avcodec_decode_video2 (
     avctx=avctx at entry=0x5555570ef310, 
picture=picture at entry=0x5555570ef0a0,
     got_picture_ptr=got_picture_ptr at entry=0x7fffffffcc64,
     avpkt=avpkt at entry=0x7fffffffcc90) at libavcodec/utils.c:1947
#25 0x00005555557a1cda in decode (sh=0x555556ba9390, data=<optimized out>,
     len=549, flags=<optimized out>) at libmpcodecs/vd_ffmpeg.c:843
#26 0x00005555556d7357 in decode_video (
     sh_video=sh_video at entry=0x555556ba9390, start=0x555556971c00 "",
     in_size=in_size at entry=549, drop_frame=drop_frame at entry=0, pts=3,
     full_frame=full_frame at entry=0x7fffffffcdc0) at 
libmpcodecs/dec_video.c:398
#27 0x00005555556650ed in update_video (
     blit_frame=blit_frame at entry=0x7fffffffce78) at mplayer.c:2473
#28 0x0000555555658973 in main (argc=1, argv=0x7fffffffdfa8) at 
mplayer.c:3784
(gdb)
(gdb)

With -vo x11, I can start another video and it works.



More information about the MPlayer-dev-eng mailing list