diff options
Diffstat (limited to 'rotord/src/libavwrapper.cpp')
| -rwxr-xr-x | rotord/src/libavwrapper.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/rotord/src/libavwrapper.cpp b/rotord/src/libavwrapper.cpp index a19e01a..673c2be 100755 --- a/rotord/src/libavwrapper.cpp +++ b/rotord/src/libavwrapper.cpp @@ -76,6 +76,18 @@ int64_t seekFunction(void* opaque, int64_t offset, int whence) } +void libav::maybeInitFFMpegLib() +{ + if (b_is_one_time_inited) + return; + av_register_all(); + avcodec_register_all(); + avformat_network_init(); + b_is_one_time_inited = true; +} + + + ///////////////////////////// // AVPacketWrapper methods // ///////////////////////////// @@ -484,15 +496,6 @@ void libav::decoder::initialize() maybeInitFFMpegLib(); } -void libav::maybeInitFFMpegLib() -{ - if (b_is_one_time_inited) - return; - av_register_all(); - avcodec_register_all(); - avformat_network_init(); - b_is_one_time_inited = true; -} bool libav::decoder::avtry(int result, const std::string& msg) { if ((result < 0) && (result != AVERROR_EOF)) { @@ -508,7 +511,6 @@ bool libav::decoder::avtry(int result, const std::string& msg) { - /////////////////////////// // encoder methods // /////////////////////////// |
