Mercurial > libavcodec.hg
comparison utils.c @ 8325:0b905a126bc9 libavcodec
Make register_avcodec() call avcodec_init().
This avoids the possibility to use a registered codec without first
initializing libavcodec, which resulted in unexpected behavior.
| author | stefano |
|---|---|
| date | Sun, 14 Dec 2008 20:04:00 +0000 |
| parents | 343f0476fd1d |
| children | f19fe0cade86 |
comparison
equal
deleted
inserted
replaced
| 8324:343f0476fd1d | 8325:0b905a126bc9 |
|---|---|
| 88 } | 88 } |
| 89 | 89 |
| 90 void register_avcodec(AVCodec *codec) | 90 void register_avcodec(AVCodec *codec) |
| 91 { | 91 { |
| 92 AVCodec **p; | 92 AVCodec **p; |
| 93 avcodec_init(); | |
| 93 p = &first_avcodec; | 94 p = &first_avcodec; |
| 94 while (*p != NULL) p = &(*p)->next; | 95 while (*p != NULL) p = &(*p)->next; |
| 95 *p = codec; | 96 *p = codec; |
| 96 codec->next = NULL; | 97 codec->next = NULL; |
| 97 } | 98 } |
