flavioribeiro / nginx-audio-track-for-hls-module

:sound: Nginx module that generates audio track for HTTP Live Streaming (HLS) streams on the fly.
GNU General Public License v3.0
136 stars 17 forks source link

Put IFDEF for different libav versions (API compatibility) #5

Closed flavioribeiro closed 1 year ago

flavioribeiro commented 11 years ago

Make something similar to www.github.com/wandenberg/nginx-video-thumbextractor-module

#if LIBAVFORMAT_VERSION_INT <= AV_VERSION_INT(53, 5, 0)
if (av_find_stream_info(pFormatCtx) < 0) {
#else
if (avformat_find_stream_info(pFormatCtx, NULL) < 0) {
#endif
     ngx_log_error(NGX_LOG_ERR, log, 0, "video thumb extractor module: Couldn't find stream information");
     rc = NGX_ERROR;
goto exit;
}