[vlc-devel] [PATCH 1/3] stream_ReadLine: don't close iconv handle on error
linkfanel at yahoo.fr
Sat Oct 3 10:00:01 CEST 2020
> Either way, my point is that both the current code and the patch seem
> wrong. You need to reset the converter to recover from error.
The patch can't be wrong in that regard, because converter errors
are orthogonal and outside of its scope. But okay. I don't have the
expertise to fully understand why you need a reset, I don't see the
documentation explaining it too much, I don't have a test case, but I'm
willing to try and submit another patch to also address this orthogonal
I'm getting that resetting involves calling iconv() with a NULL input
buffer. But it's still unclear to me whether we want to reset the
internal state alone, or reset the internal state and then output a
reset sequence to the output buffer, or do that and then attempt to
convert and output the rest of the line after the reset sequence.
> Though currently nothing expects to recover from error, AFAIK.
I'm working on adding that possibility, but it's more with long line
errors in mind as we discussed.
"Une âme dans un corps, c'est comme un dessin sur une feuille de papier."
More information about the vlc-devel