From ecf064082f305ce2f2c35d8e2f68b819883f6e1e Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Thu, 2 Jun 2011 17:34:36 +0200 Subject: [PATCH] libav 0.7: Use skip_frame instead of hurry_up --- src/transcode.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/transcode.c b/src/transcode.c index a4963a6c..9ce12caa 100644 --- a/src/transcode.c +++ b/src/transcode.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2010 Julien BLACHE + * Copyright (C) 2009-2011 Julien BLACHE * * Adapted from mt-daapd: * Copyright (C) 2006-2007 Ron Pedde @@ -279,7 +279,12 @@ transcode_seek(struct transcode_ctx *ctx, int ms) avcodec_flush_buffers(ctx->acodec); +#if LIBAVCODEC_VERSION_MAJOR >= 53 + ctx->acodec->skip_frame = AVDISCARD_NONREF; +#else ctx->acodec->hurry_up = 1; +#endif + flags = 0; while (1) { @@ -305,7 +310,11 @@ transcode_seek(struct transcode_ctx *ctx, int ms) break; } +#if LIBAVCODEC_VERSION_MAJOR >= 53 + ctx->acodec->skip_frame = AVDISCARD_DEFAULT; +#else ctx->acodec->hurry_up = 0; +#endif /* Error while reading frame above */ if (flags)