Make register_avcodec() call avcodec_init().
This avoids the possibility to use a registered codec without first initializing libavcodec, which resulted in unexpected behavior. Originally committed as revision 16131 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -90,6 +90,7 @@ AVCodec *av_codec_next(AVCodec *c){
|
||||
void register_avcodec(AVCodec *codec)
|
||||
{
|
||||
AVCodec **p;
|
||||
avcodec_init();
|
||||
p = &first_avcodec;
|
||||
while (*p != NULL) p = &(*p)->next;
|
||||
*p = codec;
|
||||
|
Reference in New Issue
Block a user