use more precise avcodec/avformat version test macros

fixes #331

Change-Id: I9205e91569f55bb09ad89e88e71884453492e03b
changes/27/12027/1
Richard Fuchs 9 years ago
parent d513c6dd2b
commit 9a5cba48f2

@ -247,7 +247,7 @@ int decoder_input(decoder_t *dec, const str *data, unsigned long ts, output_t *o
keep_going = 0;
int got_frame = 0;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 0, 0)
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 36, 0)
if (dec->avpkt.size) {
int ret = avcodec_send_packet(dec->avcctx, &dec->avpkt);
dbg("send packet ret %i", ret);
@ -303,7 +303,7 @@ int decoder_input(decoder_t *dec, const str *data, unsigned long ts, output_t *o
#endif
if (got_frame) {
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 0, 0)
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57, 36, 0)
dec->frame->pts = dec->frame->pkt_pts;
#endif
if (G_UNLIKELY(dec->frame->pts == AV_NOPTS_VALUE))

@ -35,7 +35,7 @@ static int output_flush(output_t *output) {
keep_going = 0;
int got_packet = 0;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 0, 0)
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 36, 0)
if (have_frame) {
int ret = avcodec_send_frame(output->avcctx, output->frame);
dbg("%p send frame ret %i", output, ret);
@ -197,7 +197,7 @@ int output_config(output_t *output, const format_t *requested_format, format_t *
output->avcctx->bit_rate = mp3_bitrate;
output->avst->time_base = output->avcctx->time_base;
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 0, 0)
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(57, 26, 0) // exact version? present in 57.56
avcodec_parameters_from_context(output->avst->codecpar, output->avcctx);
#endif

Loading…
Cancel
Save