protyposis / Aurio

Audio Fingerprinting & Retrieval for .NET
GNU Affero General Public License v3.0
140 stars 28 forks source link

fix: infinite read loop at end of some FFmpeg streams #24

Closed protyposis closed 10 months ago

protyposis commented 10 months ago

When FFmpeg doesn't know from file metadata where a stream ends (e.g., MPEG transport streams), it tries to read until it reaches the end. To detect the end, it looks for a specific EOF code. Update the read function to return the EOF code instead of 0 (bytes read) and prevent FFmpeg from endlessly retrying to read.