summaryrefslogtreecommitdiff
path: root/media-libs/mlt/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /media-libs/mlt/files
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'media-libs/mlt/files')
-rw-r--r--media-libs/mlt/files/mlt-6.26.1-fix-crash-w-ogg-album-art.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/media-libs/mlt/files/mlt-6.26.1-fix-crash-w-ogg-album-art.patch b/media-libs/mlt/files/mlt-6.26.1-fix-crash-w-ogg-album-art.patch
new file mode 100644
index 000000000000..4ad7ff5de416
--- /dev/null
+++ b/media-libs/mlt/files/mlt-6.26.1-fix-crash-w-ogg-album-art.patch
@@ -0,0 +1,50 @@
+From 7063e88e09977282470c4f2f93e56e05f21b7c2b Mon Sep 17 00:00:00 2001
+From: Dan Dennedy <dan@dennedy.org>
+Date: Fri, 16 Apr 2021 11:15:37 -0700
+Subject: [PATCH] fix #704 by properly identifying cover art
+
+(cherry picked from commit 6b0829df726aa9a840b8b34e923e9faf17a3a5ca)
+---
+ src/modules/avformat/producer_avformat.c | 15 ++++-----------
+ 1 file changed, 4 insertions(+), 11 deletions(-)
+
+diff --git a/src/modules/avformat/producer_avformat.c b/src/modules/avformat/producer_avformat.c
+index 049452f9d..e079e6f70 100644
+--- a/src/modules/avformat/producer_avformat.c
++++ b/src/modules/avformat/producer_avformat.c
+@@ -398,10 +398,7 @@ static mlt_properties find_default_streams( producer_avformat self )
+ if ( first_video_index < 0 )
+ first_video_index = i;
+ // Only set the video stream if not album art
+- if (self->video_index < 0 &&
+- (codec_params->codec_id != AV_CODEC_ID_MJPEG ||
+- codec_context->time_base.num != 1 ||
+- codec_context->time_base.den != 90000)) {
++ if (self->video_index < 0 && !(context->streams[i]->disposition & AV_DISPOSITION_ATTACHED_PIC)) {
+ self->video_index = i;
+ }
+ mlt_properties_set( meta_media, key, "video" );
+@@ -1682,11 +1679,7 @@ static int producer_get_image( mlt_frame frame, uint8_t **buffer, mlt_image_form
+ codec_params = stream->codecpar;
+
+ // Always use the image cache for album art.
+- int is_album_art = ((codec_context->codec_id == AV_CODEC_ID_MJPEG
+- || codec_context->codec_id == AV_CODEC_ID_GIF
+- || codec_context->codec_id == AV_CODEC_ID_PNG)
+- && mlt_properties_get_int(properties, "meta.media.frame_rate_num") == 90000
+- && mlt_properties_get_int(properties, "meta.media.frame_rate_den") == 1);
++ int is_album_art = stream->disposition & AV_DISPOSITION_ATTACHED_PIC;
+ if (is_album_art)
+ position = 0;
+
+@@ -2296,8 +2289,8 @@ static int video_codec_init( producer_avformat self, int index, mlt_properties p
+ mlt_properties_set_int( properties, "meta.media.frame_rate_num", frame_rate.num );
+ mlt_properties_set_int( properties, "meta.media.frame_rate_den", frame_rate.den );
+
+- // MP3 album art is a single JPEG at 90000 fps, which is not seekable.
+- if ( codec->id == AV_CODEC_ID_MJPEG && frame_rate.num == 90000 && frame_rate.den == 1 )
++ // Cover art is a single image at 90000 fps, which is not seekable.
++ if (stream->disposition & AV_DISPOSITION_ATTACHED_PIC)
+ self->video_seekable = 0;
+
+ // Set the YUV colorspace from override or detect