[vlc-commits] libav*: move avformat/avcodec init to a single header file

Rafaël Carré git at videolan.org
Sun Apr 15 23:40:01 CEST 2012


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Apr 15 15:47:30 2012 -0400| [c80302423b60e6b11a013f8e4e3df6bd36b25c54] | committer: Rafaël Carré

libav*: move avformat/avcodec init to a single header file

Avoid repeating the same implementation several times:
 incorrectly (switcher and mux didn't lock)
 redundantly (avcodec_register_all can be called several times)

Move libavXXX init at the top of a few functions, just in case.

Check uses of vlc_avcodec_(un)lock and factorize

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c80302423b60e6b11a013f8e4e3df6bd36b25c54
---

 modules/access/avio.c               |    9 ++----
 modules/codec/avcodec/Modules.am    |    1 +
 modules/codec/avcodec/avcodec.c     |   29 +-----------------
 modules/codec/avcodec/avcodec.h     |    2 -
 modules/codec/avcodec/avcommon.h    |   55 +++++++++++++++++++++++++++++++++++
 modules/codec/avcodec/deinterlace.c |    7 ++--
 modules/codec/avcodec/encoder.c     |    7 ++--
 modules/codec/avcodec/subtitle.c    |    3 +-
 modules/demux/avformat/Modules.am   |    1 +
 modules/demux/avformat/demux.c      |    7 ++--
 modules/demux/avformat/mux.c        |    4 +-
 modules/stream_out/switcher.c       |   15 ++++-----
 12 files changed, 83 insertions(+), 57 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=c80302423b60e6b11a013f8e4e3df6bd36b25c54


More information about the vlc-commits mailing list