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 libav versions (API compatibility) #4

Closed flavioribeiro closed 11 years ago

flavioribeiro commented 11 years ago

Make something similar to https://github.com/wandenberg/nginx-video-thumbextractor-module/blob/master/src/ngx_http_video_thumbextractor_module_utils.c :

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;
}