[FFmpeg-devel] [PATCH] avcodec: Add AVClass to AVCodecParameters
derek.buitenhuis at gmail.com
Tue May 10 14:08:51 CEST 2016
On 5/10/2016 12:43 PM, Michael Niedermayer wrote:
> This patch adds an AVClass field to AVCodecParameters like we use in
> other public structures.
> i fail to see how this patch is related to your reply
I apologize. I thought it was the start of an attempt to address the "issue"
from the other patchset. Sorry about that.
> What the patch does, is it makes the API more consistent and easy to
> use. Users call the AVOption functions to set fields in the main
> public structures, if they do that for AVCodecParameters it would
> Even an empty AVClass that doesnt list options would reduce that
> misery by at least not crashing but giving a clear error message.
I don't really understand why this is a problem? The API crashes when
the user uses unrelated functions on it? Why on earth should we bend
over backwards to support that?
I am not entirely sure of the goal of this patch, to be honest, if
the only benefit is making incorrect API usage OK. Could you please
elaborate? Is it useful to have multiple ways to do the same thing?
Or is the goal to make it ABI-stable by asking users to use a similar
approach to AVOptions?
Perhaps the goals can be added to the commit message.
More information about the ffmpeg-devel