if ffmpeg -i .name.ass fails, then rm .name.ass

main
bel 2025-05-25 11:46:16 -06:00
parent 8efffd0fe4
commit 9c0129f968
1 changed files with 4 additions and 0 deletions

View File

@ -56,6 +56,10 @@ func deport(ctx context.Context, p string) error {
}
if err := ffmpeg(ctx, "-y", "-i", ass, srt); err != nil {
if ctx.Err() == nil {
log.Printf("ffmpeg failed to process %s; removing", ass)
os.Remove(ass)
}
return err
}