On 03/28/2015 03:39 PM, Luca Barbato wrote:
On 28/03/15 19:04, Himangi Saraogi wrote:
This really never should happen in practice, but at any rate the correct
error value is AVERROR(EINVAL) because it is an unsupported/invalid field
set by the user.
Since this is never to be reached, can we have an assert instead of return?
No and I'd rather not have another discussion on why using reachable
asserts is wrong (in this case in particular even more).
I think I wrote a patch to wrap __builtin_unreachable() some time ago
for the cases in which could be useful.
Incidentally _this_ is not the case.
Please return AVERROR(EINVAL), that path is easily reachable by the
"appropriate" input even from avconv...
EIVAL is fine, but out of curiosity, how is this reachable with avconv?
Doesn't avcodec_open2() check avctx->pix_fmt against the codec pix_fmts
list? I know a user could theoretically change pix_fmt after opening the
encoder, but I don't see how avconv could.
-Justin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel