THausherr commented on PR #2315: URL: https://github.com/apache/tika/pull/2315#issuecomment-3266016287
I also asked copilot with GPT4 and it didn't bring anything useful. However GPT5 did bring what I mentioned, and another one: === Possible correctness edge case: isExclusivelyAudio() uses allMatch over directories filtered to Mp4MediaDirectory. If that filtered set is empty, allMatch returns true and you’ll incorrectly force audio/mp4. This can happen if metadata-extractor didn’t produce any Mp4MediaDirectory entries. A safer check would be: Return true iff there is at least one Mp4SoundDirectory and no Mp4VideoDirectory. Example: hasSound = anyMatch(d instanceof Mp4SoundDirectory) hasVideo = anyMatch(d instanceof Mp4VideoDirectory) return hasSound && !hasVideo === So the question is, could an MP4 file with "empty directories" exist at all? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tika.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org