aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-12-14 20:04:00 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2008-12-14 20:04:00 +0000
commit7a961a46ba28e49f88ff0e81b96395c96b424634 (patch)
tree81d22ac4380a5cf025ddf9c5045193abf32342f9 /libavcodec/utils.c
parent335a761a908bedc7b8b488d04890bcfe36bb812f (diff)
downloadffmpeg-7a961a46ba28e49f88ff0e81b96395c96b424634.tar.gz
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
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 755af1ac62..713a4c298a 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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;