From: Carl Hetherington Date: Fri, 23 Feb 2018 01:06:15 +0000 (+0000) Subject: And more back-compat. X-Git-Url: https://main.carlh.net/gitweb/?p=libdcp.git;a=commitdiff_plain;h=d0848d2371c4ab13bd56f665d081b7683fdfca14 And more back-compat. --- diff --git a/ffcmp.c b/ffcmp.c index b9ed14d3..720a597e 100644 --- a/ffcmp.c +++ b/ffcmp.c @@ -56,7 +56,7 @@ open_file(char* filename) #ifdef FFCMP_HAVE_AVUTIL_FRAME_H file.current_frame = av_frame_alloc(); #else - file.current_frame = av_alloc_frame(); + file.current_frame = avcodec_alloc_frame(); #endif if (!file.current_frame) { fprintf(stderr, "Could not allocate frame.\n"); @@ -101,7 +101,11 @@ read_frame(File* file) file->complete_frames[file->n_complete_frames].frame = file->current_frame; file->complete_frames[file->n_complete_frames].stream_index = file->packet.stream_index; ++file->n_complete_frames; +#ifdef FFCMP_HAVE_AVUTIL_FRAME_H file->current_frame = av_frame_alloc(); +#else + file->current_frame = avcodec_alloc_frame(); +#endif if (!file->current_frame) { fprintf(stderr, "Could not allocate frame.\n"); exit(EXIT_FAILURE);