avidemux2
avidemux2 copied to clipboard
[ivtcDupeRemover] return true from ivtcDupeRemover::getNextFrame
It is declared as returning a bool, but returns nothing. But the callers expect something to be returned: true in case it succeeded.
Double check I got it right...
Could you please explain under which circumstances the added return statement can be ever reached?
@eumagga0x2a compiler warns about the default
label. ADM_assert
expands to ADM_backTrack
, but the latter is not defined with no_return
attribute. And it actually can return on some platforms (HAIKU or sun), see: https://github.com/mean00/avidemux2/blob/59c11947d07fead588336a4b75a73fc2681711a0/avidemux_core/ADM_core/src/ADM_crashdump_unix.cpp#L185-L231
Based on the previous comment, it should return false
, given there is return true
hidden in the END_PROCESS
macros used there.
the latter is not defined with no_return attribute
Maybe that is the root issue?
Why are these two cases "unsupported"? Unwanted, impossible or ToDo?
Shouldn't ADM_backTrack
print an error and exit, instead of ignoring and returning?
it actually can return on some platforms (HAIKU or sun)
You may want to add a comment here about that.
the latter is not defined with no_return attribute
Maybe that is the root issue? Why are these two cases "unsupported"? Unwanted, impossible or ToDo? Shouldn't
ADM_backTrack
print an error and exit, instead of ignoring and returning?
IMO, it should always die for consistency (and be declared as noreturn
). But this is the first time I looked into the avidemux code so I am not the one to decide this...
it actually can return on some platforms (HAIKU or sun)
You may want to add a comment here about that.
What do you mean by here here?
Anyway, pushing implementation of the above shortly.
What do you mean by
here
here?
I meant at ivtcDupeRemover::getNextFrame()
,
but that is superseded by your new/current commit.