mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-12 23:43:23 -05:00
ffmpeg/libav conditions for CodecID and AVCODEC_MAX_AUDIO_FRAME_SIZE (thanks @freultwah)
This commit is contained in:
parent
6decdf4eaf
commit
785383861b
@ -318,9 +318,15 @@ scan_metadata_ffmpeg(char *file, struct media_file_info *mfi)
|
||||
{
|
||||
AVFormatContext *ctx;
|
||||
const struct metadata_map *extra_md_map;
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 55 || (LIBAVCODEC_VERSION_MAJOR == 54 && LIBAVCODEC_VERSION_MINOR >= 35)
|
||||
enum AVCodecID codec_id;
|
||||
enum AVCodecID video_codec_id;
|
||||
enum AVCodecID audio_codec_id;
|
||||
#else
|
||||
enum CodecID codec_id;
|
||||
enum CodecID video_codec_id;
|
||||
enum CodecID audio_codec_id;
|
||||
#endif
|
||||
AVStream *video_stream;
|
||||
AVStream *audio_stream;
|
||||
int mdcount;
|
||||
|
@ -55,7 +55,11 @@
|
||||
#include "transcode.h"
|
||||
|
||||
|
||||
#define XCODE_BUFFER_SIZE ((AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2)
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 56 || (LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR >= 18)
|
||||
# define XCODE_BUFFER_SIZE ((192000 * 3) / 2)
|
||||
#else
|
||||
# define XCODE_BUFFER_SIZE ((AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2)
|
||||
#endif
|
||||
|
||||
|
||||
struct transcode_ctx {
|
||||
|
Loading…
Reference in New Issue
Block a user