码迷,mamicode.com
首页 > 其他好文 > 详细

avformat_open_input() always return -13

时间:2015-05-20 11:31:43      阅读:692      评论:0      收藏:0      [点我收藏+]

标签:

我在调用avformat_open_input的时候,一直返回-13错误,如下代码:

const char *url = "/mnt/sdcard/xpg.mp4";
    av_register_all();

    AVFormatContext *pFormatCtx = NULL;
    int ret = avformat_open_input(&pFormatCtx, url, NULL, NULL);

    LOGE("ret:%d", ret);



http://stackoverflow.com/questions/21549829/ffmpeg-avformat-open-input-returned-error 中的解释,-13是权限相关的错误,于是在AndroidManifest.xml中加入以下权限即可:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />



avformat_open_input() always return -13

标签:

原文地址:http://my.oschina.net/jerikc/blog/417121

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!