Skip to content

Commit

Permalink
Fixed codec check again
Browse files Browse the repository at this point in the history
  • Loading branch information
McCloudS authored Sep 8, 2024
1 parent f63db83 commit d9d8b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ def has_audio(file_path):
for stream in container.streams:
if stream.type == 'audio':
# Check if the stream has a codec and if it is valid
if stream.codec and stream.codec.name != 'none':
if stream.codec_context and stream.codec_context.name != 'none':
return True
else:
logging.debug(f"Unsupported or missing codec for audio stream in {file_path}")
Expand Down

0 comments on commit d9d8b67

Please sign in to comment.