mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 07:05:57 -05:00
[configure] Use avcodec_parameters_from_context as check for codecpar
This commit is contained in:
parent
6b94a34501
commit
e489f1a6a9
@ -250,7 +250,6 @@ FORK_MODULES_CHECK([FORKED], [LIBAV],
|
||||
[libavfilter/avfilter.h])
|
||||
FORK_CHECK_DECLS([av_packet_unref], [libavcodec/avcodec.h])
|
||||
FORK_CHECK_DECLS([av_packet_rescale_ts], [libavcodec/avcodec.h])
|
||||
FORK_CHECK_DECLS([avcodec_parameters_alloc], [libavcodec/avcodec.h])
|
||||
FORK_CHECK_DECLS([avformat_alloc_output_context2],
|
||||
[libavformat/avformat.h])
|
||||
FORK_CHECK_DECLS([av_frame_alloc], [libavutil/frame.h])
|
||||
@ -261,7 +260,6 @@ FORK_MODULES_CHECK([FORKED], [LIBAV],
|
||||
AC_CHECK_HEADERS([libavutil/channel_layout.h libavutil/mathematics.h])
|
||||
])
|
||||
])
|
||||
|
||||
AM_CONDITIONAL([COND_FFMPEG_LEGACY], [[test "x$modern_av_apis" = "xno"]])
|
||||
|
||||
AC_CHECK_SIZEOF([void *])
|
||||
|
@ -370,11 +370,11 @@ scan_metadata_ffmpeg(const char *file, struct media_file_info *mfi)
|
||||
|
||||
if (mfi->data_kind == DATA_KIND_HTTP)
|
||||
{
|
||||
# ifndef HAVE_FFMPEG
|
||||
#ifndef HAVE_FFMPEG
|
||||
// Without this, libav is slow to probe some internet streams
|
||||
ctx = avformat_alloc_context();
|
||||
ctx->probesize = 64000;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
free(path);
|
||||
ret = http_stream_setup(&path, file);
|
||||
@ -425,7 +425,7 @@ scan_metadata_ffmpeg(const char *file, struct media_file_info *mfi)
|
||||
|
||||
for (i = 0; i < ctx->nb_streams; i++)
|
||||
{
|
||||
#if HAVE_DECL_AVCODEC_PARAMETERS_ALLOC
|
||||
#if HAVE_DECL_AVCODEC_PARAMETERS_FROM_CONTEXT
|
||||
codec_type = ctx->streams[i]->codecpar->codec_type;
|
||||
codec_id = ctx->streams[i]->codecpar->codec_id;
|
||||
sample_rate = ctx->streams[i]->codecpar->sample_rate;
|
||||
|
Loading…
Reference in New Issue
Block a user