mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/options: Remove always-true check
Added in dc51a72ba4
, yet even back then
the check was always true as the AVCodecContext has already been memset
to zero before that.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
77616c5fb4
commit
784c3c0d85
|
@ -140,12 +140,10 @@ static int init_context_defaults(AVCodecContext *s, const AVCodec *codec)
|
|||
|
||||
s->reordered_opaque = AV_NOPTS_VALUE;
|
||||
if(codec && codec->priv_data_size){
|
||||
if(!s->priv_data){
|
||||
s->priv_data= av_mallocz(codec->priv_data_size);
|
||||
if (!s->priv_data) {
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
}
|
||||
if(codec->priv_class){
|
||||
*(const AVClass**)s->priv_data = codec->priv_class;
|
||||
av_opt_set_defaults(s->priv_data);
|
||||
|
|
Loading…
Reference in New Issue