Skip to content

Commit

Permalink
fix test stream needs processing to test ENCODER tag for libfdk_aac v…
Browse files Browse the repository at this point in the history
…alue
  • Loading branch information
yajrendrag committed Apr 7, 2024
1 parent 86c92f9 commit 6ea5b13
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions source/encoder_audio_libfdk_aac/changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

**<span style="color:#56adda">0.0.4</span>**
- fix test stream functiojn to test tags for ENCODER value containing 'libfdk_aac'

**<span style="color:#56adda">0.0.3</span>**
- fix library call in plugin.py

Expand Down
2 changes: 1 addition & 1 deletion source/encoder_audio_libfdk_aac/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"on_worker_process": 0
},
"tags": "audio,encoder,ffmpeg,library file test",
"version": "0.0.3"
"version": "0.0.4"
}
6 changes: 4 additions & 2 deletions source/encoder_audio_libfdk_aac/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __set_custom_options_form_settings(self):
class PluginStreamMapper(StreamMapper):
def __init__(self):
super(PluginStreamMapper, self).__init__(logger, ['audio'])
self.codec = 'libfdk_aac'
self.codec = 'aac'
self.encoder = 'libfdk_aac'
self.settings = None

Expand Down Expand Up @@ -138,7 +138,9 @@ def calculate_bitrate(stream_info: dict):

def test_stream_needs_processing(self, stream_info: dict):
# Ignore streams already of the required codec_name
if stream_info.get('codec_name').lower() in [self.codec]:
if stream_info.get('codec_name').lower() in [self.codec] and
('tags' in stream_info and 'ENCODER' in stream_info.get('tags') and
self.encoder in stream_info.get('tags')['ENCODER']):
return False
return True

Expand Down

0 comments on commit 6ea5b13

Please sign in to comment.