Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print debug output to stderr in vtt.c #62

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

alumae
Copy link

@alumae alumae commented Jun 4, 2020

Fixes issue #55

@dwbuiten
Copy link

dwbuiten commented Jun 4, 2020

Polluting to stderr from a library isn't much better than polluting stdout.

A real solution would be to have an API to provide a logging callback and opaque user pointer to pass to that callback.

@alumae
Copy link
Author

alumae commented Jun 4, 2020

If a program outputs actual data to stdout, then "polluting" stderr is the only option. This fix was made because the example program flv+srt can output the processed media stream to stdout. If stdout also contains debug messages, the resulting stream will be invalid.

@dwbuiten
Copy link

dwbuiten commented Jun 4, 2020

This is untrue. stderr is not the only option - did you read what I wrote? I provided exactly what the correct option is.

@alumae
Copy link
Author

alumae commented Jun 4, 2020

Yes, you are right. I should have rewritten the library that I used today for the first time, that I needed for a small thing, by implementing an API with callbacks and user pointers. Thank you for pointing out what is exactly the correct option.

@dwbuiten
Copy link

dwbuiten commented Jun 4, 2020

I merely contested that it was the "only" option, which is what you said. Please settle down.

I think if you have no interest in correcting the behavior, it is preferable to comment out or remove them instead - @szatmary's approval pending, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants