From 303187e29bfafe75f23d2a7e245c2e4b5e4cb381 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 20 Jun 2021 14:37:23 +0200 Subject: [PATCH] Revert "Media Kit: use the B_WRITABLE flag in plugins" This reverts hrev54422. I'm not sure what I was trying to fix with this change. The way the media kit is currently designed, the list of supported formats (including for reading) comes only from writer plugins. This means it is impossible to have a decode-only plugin currently. And the list is called "fWriterFileFormats" but in fact is the only list used to implement get_next_file_formats, so it should contain all formats. This current setup works for the ffmpeg plugin, but it should be cleaned. This fixes Youtube playback. The problem was simply that we were not reporting support for any of the Youtube video formats anymore. Unfortunately, the app_server crashes when playing Youtube videos are still there. Change-Id: Ie5025cd48e2ab23b616bad49eec1401331ffb0ed Reviewed-on: https://review.haiku-os.org/c/haiku/+/4103 Reviewed-by: X512 Reviewed-by: Panagiotis Vasilopoulos Reviewed-by: Alex von Gluck IV Tested-by: Commit checker robot --- src/kits/media/AddOnManager.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/kits/media/AddOnManager.cpp b/src/kits/media/AddOnManager.cpp index c050d349b7..8ef6228005 100644 --- a/src/kits/media/AddOnManager.cpp +++ b/src/kits/media/AddOnManager.cpp @@ -519,13 +519,9 @@ AddOnManager::_RegisterWriter(WriterPlugin* writer, const entry_ref& ref) return; } for (uint i = 0 ; i < count ; i++) { - media_file_format fileFormat = fileFormats[i]; - // Ignore non-writable formats - if ((fileFormat.capabilities & media_file_format::B_WRITABLE) == 0) - continue; - // Generate a proper ID before inserting this format, this encodes // the specific plugin in the media_file_format. + media_file_format fileFormat = fileFormats[i]; fileFormat.id.node = ref.directory; fileFormat.id.device = ref.device; fileFormat.id.internal_id = info.internalID;