mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Fix the other case of avformat_open_input too
This commit is contained in:
parent
557257f4b8
commit
efe1285e88
@ -120,7 +120,7 @@ open_vfs(const Filename &filename) {
|
|||||||
|
|
||||||
// Now we can open the stream.
|
// Now we can open the stream.
|
||||||
int result =
|
int result =
|
||||||
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
|
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
|
||||||
avformat_open_input(&_format_context, url.c_str(), NULL, NULL);
|
avformat_open_input(&_format_context, url.c_str(), NULL, NULL);
|
||||||
#else
|
#else
|
||||||
av_open_input_file(&_format_context, url.c_str(), NULL, 0, NULL);
|
av_open_input_file(&_format_context, url.c_str(), NULL, 0, NULL);
|
||||||
@ -180,8 +180,12 @@ open_subfile(const SubfileInfo &info) {
|
|||||||
string url = strm.str();
|
string url = strm.str();
|
||||||
|
|
||||||
// Now we can open the stream.
|
// Now we can open the stream.
|
||||||
int result =
|
int result =
|
||||||
|
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(53, 2, 0)
|
||||||
avformat_open_input(&_format_context, url.c_str(), NULL, NULL);
|
avformat_open_input(&_format_context, url.c_str(), NULL, NULL);
|
||||||
|
#else
|
||||||
|
av_open_input_file(&_format_context, url.c_str(), NULL, 0, NULL);
|
||||||
|
#endif
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
_format_context = NULL;
|
_format_context = NULL;
|
||||||
close();
|
close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user