Ver código fonte

add avformat_network_init

DevYK 3 anos atrás
pai
commit
d8ae223ff2
2 arquivos alterados com 2 adições e 1 exclusões
  1. 1 1
      build.sh
  2. 1 0
      src/ffmpeg/av_decode.cpp

+ 1 - 1
build.sh

@@ -3,7 +3,7 @@
 mkdir build && cd build
 mkdir build && cd build
 
 
 #Release Debug
 #Release Debug
-cmake -DCMAKE_BUILD_TYPE=Debug ..
+cmake -DCMAKE_BUILD_TYPE=Release ..
 
 
 make -j4
 make -j4
 
 

+ 1 - 0
src/ffmpeg/av_decode.cpp

@@ -161,6 +161,7 @@ long initDecoder(const char *url, int force_Iframe, DisableMediaType disableMedi
     dctx->end_time = -1;
     dctx->end_time = -1;
     dctx->disableType = disableMediaType;
     dctx->disableType = disableMediaType;
     char err_info[512] = {0};
     char err_info[512] = {0};
+    avformat_network_init();
     int ret = avformat_open_input(&(dctx->avformatContext), dctx->url, NULL, NULL);
     int ret = avformat_open_input(&(dctx->avformatContext), dctx->url, NULL, NULL);
 
 
     if (ret != 0) {
     if (ret != 0) {