And more back-compat.
authorCarl Hetherington <cth@carlh.net>
Fri, 23 Feb 2018 01:06:15 +0000 (01:06 +0000)
committerCarl Hetherington <cth@carlh.net>
Fri, 23 Feb 2018 01:06:15 +0000 (01:06 +0000)
ffcmp.c

diff --git a/ffcmp.c b/ffcmp.c
index b9ed14d362a801519405c8a33b9dd7f799cf3747..720a597e5976bacf576464c3b2952740da92d291 100644 (file)
--- 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);