diff options
Diffstat (limited to 'build_with_latest_ffmpeg.patch')
-rw-r--r-- | build_with_latest_ffmpeg.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/build_with_latest_ffmpeg.patch b/build_with_latest_ffmpeg.patch new file mode 100644 index 000000000000..05647a59d491 --- /dev/null +++ b/build_with_latest_ffmpeg.patch @@ -0,0 +1,34 @@ +diff -ura old/src/hiptext.cc new/src/hiptext.cc +--- old/src/hiptext.cc 2016-06-23 12:08:20.000000000 +0200 ++++ new/src/hiptext.cc 2017-04-06 01:52:58.663255035 +0200 +@@ -250,12 +250,13 @@ + } + string path = argv[1]; + string extension = GetExtension(path); ++ string uri_sig = "://"; // Given this string signature, assume that it's a video stream + if (extension == "png") { + artiste.PrintImage(LoadPNG(path)); + } else if (extension == "jpg" || extension == "jpeg") { + artiste.PrintImage(LoadJPEG(path)); + } else if (extension == "mov" || extension == "mp4" || extension == "flv" || +- extension == "avi" || extension == "mkv") { ++ extension == "avi" || extension == "mkv" || path.find(uri_sig) != string::npos) { + artiste.PrintMovie(Movie(path)); + } else { + fprintf(stderr, "Unknown Filetype: %s\n", extension.data()); +diff -ura old/src/movie.cc new/src/movie.cc +--- old/src/movie.cc 2016-06-23 12:08:20.000000000 +0200 ++++ new/src/movie.cc 2017-04-06 01:51:13.826569913 +0200 +@@ -15,6 +15,12 @@ + #include "hiptext/graphic.h" + #include "hiptext/pixel.h" + ++#if (LIBAVFORMAT_VERSION_INT) > AV_VERSION_INT(55, 16, 0) ++#define PIX_FMT_RGB24 AV_PIX_FMT_RGB24 ++#define avcodec_alloc_frame() av_frame_alloc() ++#define av_free_packet(packet) av_packet_unref(packet) ++#endif ++ + Movie::Movie(const std::string& path) { + format_ = avformat_alloc_context(); + |