JCHub

  • Home
  • Category
    • A/V
    • WebRTC
    • Beauty of Programming
    • Linux
    • Windows
    • Moments of Life
    • Campus Life
  • Reference
    • API Reference
    • Utilities
    • AV Test
    • Doc
  • Message Board
  • About
JCHub
Code as My Sword, Lost in Obsession
  1. Main page
  2. A/V
  3. Main content

libvlc_new初始化失败

2015年11月13日 6509hotness 5likes 7comments

最近在做一个视频播放器,用到了libvlc,使用起来也是挺方便的,不过刚开始的时候遇到了一个问题:
libvlc_new(0, NULL)这个函数总是返回NULL,后来发现是没把vlc的Plugins文件夹也放到程序执行目录,我只放了libvlc.dll与libvlccore.dll那两个dll文件,vlc初始化过程也需要初始化相应插件。放了之后,一切正常。

---------------------------------------------------------------------------------------------------
/*2015-12-25*/
今天在linux下做libvlc开发,也遇到了libvlc_new执行失败的问题,我用的是QT框架。程序执行这一函数时候,报如下错误提示:

1
2
The inferior stopped because it received a signal from the Operating System.
Signal name : SIGSEGV Signal meaning : Segmentation fault

libvlc_new fail

卸载重装vlc与libvlc-dev也没解决问题,后来查了些资料,发现问题是出在vlc的插件缓存,该缓存需要刷新。

1
sudo /usr/lib/vlc/vlc-cache-gen -f /usr/lib/vlc/plugins

通过上述命令即可解决。

--------------------------------------------------------------------------------------------------

This article is licensed with Creative Commons Attribution-NonCommercial-No Derivatives 4.0 International License
Tag: 音视频
Last updated:2018年12月23日

Jeff

管理员——代码为剑,如痴如醉

Tip the author Like
< Last article
Next article >

Comments

  • 维纳斯

    博主用的是最新版本的vlc吗?

    2015年12月8日
    Reply
    • Jianchihu

      @维纳斯 是的

      2015年12月8日
      Reply
  • 大A

    2016年7月11日
    Reply
  • 番茄

    卧槽,谢谢楼主,我在linux下面也遇到了libvlc_new崩溃问题,重装vlc都没法,按着你说的就解决!!

    2016年8月12日
    Reply
    • Jianchihu

      @番茄 不客气,解决就好

      2016年8月14日
      Reply
  • phoebe

    写的不错,正好我也遇到了这个问题

    2019年1月7日
    Reply
  • 杨林楠

    谢谢大佬,我解决了,点赞

    2021年12月31日
    Reply
  • razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
    Cancel

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Related Posts
    • 告别CapCut收费!开源视频剪辑工具OpenCut 来了
    • 音视频开发入门:视频基础
    • 大话WebRTC
    • WebRTC音视频传输基础:NAT穿透
    • Intel平台硬件加速视频编解码开发
    Categories

    COPYRIGHT © 2026 jianchihu.net. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang