Bump FFmpeg to 6.1. v2.17.10
authorCarl Hetherington <cth@carlh.net>
Thu, 25 Jan 2024 19:15:27 +0000 (20:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 28 Jan 2024 22:00:53 +0000 (23:00 +0100)
cscript
platform/windows/wscript
src/lib/audio_filter_graph.h
src/lib/ffmpeg_examiner.cc
test/data
test/ffmpeg_examiner_test.cc

diff --git a/cscript b/cscript
index 8fce3b4eee5592c8f9caf40fff7ebeb81e31d0a0..f1339e050ffc2050a4bb0f8276c56daac505c951 100644 (file)
--- a/cscript
+++ b/cscript
@@ -502,7 +502,7 @@ def dependencies(target, options):
         ffmpeg_options = {}
 
     if target.platform != 'linux' or target.distro != 'arch':
-        deps = [('ffmpeg', '38d4c009b128f0bf8b67a1875489eb214f5c0fcb', ffmpeg_options)]
+        deps = [('ffmpeg', '0b73d2f5e70a04a67aa902902c42e3025ef3bb77', ffmpeg_options)]
     else:
         # Use distro-provided FFmpeg on Arch
         deps = []
@@ -518,7 +518,7 @@ def dependencies(target, options):
     deps.append(('openssl', '54298369cacfe0ae01c5aa42ace8a463fd2e7a2e'))
     if can_build_disk(target):
         deps.append(('lwext4', 'ab082923a791b58478d1d9939d65a0583566ac1f'))
-    deps.append(('ffcmp', '50648dd763e915787f907a812c630742664cdb77'))
+    deps.append(('ffcmp', '5ab6ed3b75d8ca7cf1f66bb9fb08792b92f4b419'))
 
     return deps
 
index f76f7aedeb63a3a01ad5d35cda0d285efaed9963..02acb041be575b25474bc3f2dfc03295d1074039 100644 (file)
@@ -195,14 +195,14 @@ File "%cdist_deps%/lib/liblwext4.dll"
         """, file=f)
 
     print("""
-File "%cdist_deps%/bin/avcodec-59.dll"
-File "%cdist_deps%/bin/avfilter-8.dll"
-File "%cdist_deps%/bin/avformat-59.dll"
-File "%cdist_deps%/bin/avutil-57.dll"
-File "%cdist_deps%/bin/avdevice-59.dll"
-File "%cdist_deps%/bin/postproc-56.dll"
+File "%cdist_deps%/bin/avcodec-60.dll"
+File "%cdist_deps%/bin/avfilter-9.dll"
+File "%cdist_deps%/bin/avformat-60.dll"
+File "%cdist_deps%/bin/avutil-58.dll"
+File "%cdist_deps%/bin/avdevice-60.dll"
+File "%cdist_deps%/bin/postproc-57.dll"
 File "%cdist_deps%/bin/swresample-4.dll"
-File "%cdist_deps%/bin/swscale-6.dll"
+File "%cdist_deps%/bin/swscale-7.dll"
 File "%cdist_deps%/bin/dcp-1.0.dll"
 File "%cdist_deps%/bin/cxml-0.dll"
 File "%cdist_deps%/bin/sub-1.0.dll"
index 1ac2b071b3c829471f8cd2039a6b334a748ddc94..6d09f15be23d27d0bd7ed5bb37a88375867045e4 100644 (file)
@@ -26,6 +26,7 @@
 #include "filter_graph.h"
 extern "C" {
 #include <libavfilter/buffersink.h>
+#include <libavutil/channel_layout.h>
 }
 
 class AudioBuffers;
index 59c74b9cc82dce5565fdbd233bfb2d8ddbec0b9d..824b496d879b4e7ff3b199183ac9da5dec01d4ea 100644 (file)
@@ -173,7 +173,6 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                /* This code taken from get_rotation() in ffmpeg:cmdutils.c */
                auto stream = _format_context->streams[*_video_stream];
                auto rotate_tag = av_dict_get (stream->metadata, "rotate", 0, 0);
-               uint8_t* displaymatrix = av_stream_get_side_data (stream, AV_PKT_DATA_DISPLAYMATRIX, 0);
                _rotation = 0;
 
                if (rotate_tag && *rotate_tag->value && strcmp(rotate_tag->value, "0")) {
@@ -184,8 +183,9 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                        }
                }
 
-               if (displaymatrix && !_rotation) {
-                       _rotation = - av_display_rotation_get ((int32_t*) displaymatrix);
+               auto side_data = av_packet_side_data_get(stream->codecpar->coded_side_data, stream->codecpar->nb_coded_side_data, AV_PKT_DATA_DISPLAYMATRIX);
+               if (side_data && !_rotation) {
+                       _rotation = - av_display_rotation_get(reinterpret_cast<int32_t*>(side_data->data));
                }
 
                _rotation = *_rotation - 360 * floor (*_rotation / 360 + 0.9 / 360);
@@ -244,7 +244,7 @@ FFmpegExaminer::video_packet (AVCodecContext* context, string& temporal_referenc
                        ).get_value_or (ContentTime ()).frames_round (video_frame_rate().get ());
        }
        if (temporal_reference.size() < (PULLDOWN_CHECK_FRAMES * 2)) {
-               temporal_reference += (_video_frame->top_field_first ? "T" : "B");
+               temporal_reference += ((_video_frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) ? "T" : "B");
                temporal_reference += (_video_frame->repeat_pict ? "3" : "2");
        }
 
index 916370761c2451c8f59e978cf9e14fd7aac8319a..515c71604fe16cc95a5f240b0333f78f47b9ea97 160000 (submodule)
--- a/test/data
+++ b/test/data
@@ -1 +1 @@
-Subproject commit 916370761c2451c8f59e978cf9e14fd7aac8319a
+Subproject commit 515c71604fe16cc95a5f240b0333f78f47b9ea97
index c745335ae2b4dbba571d5b9381e2d538d502b4a5..231bd16e0aa51f242f013ac6dca314d12f674c76 100644 (file)
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_examiner_probesize_test)
        BOOST_CHECK_EQUAL (examiner->audio_streams()[0]->frame_rate(), 48000);
        BOOST_CHECK_EQUAL (examiner->audio_streams()[0]->channels(), 2);
        BOOST_CHECK_EQUAL (examiner->audio_streams()[1]->frame_rate(), 48000);
-       BOOST_CHECK_EQUAL (examiner->audio_streams()[1]->channels(), 5);
+       BOOST_CHECK_EQUAL (examiner->audio_streams()[1]->channels(), 6);
 }