On Tue, 13 Jan 2015, Anton Khirnov wrote:

Quoting Vittorio Giovara (2014-12-04 20:56:27)
---
 libavformat/avformat.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 197a3f1..f4e1fec 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1381,6 +1381,8 @@ const AVClass *avformat_get_class(void);
  * @param c If non-NULL, the AVCodecContext corresponding to the new stream
  * will be initialized to use this codec. This is needed for e.g. 
codec-specific
  * defaults to be set, so codec should be provided if it is known.
+ * @note @ref avcodec_open2() will be called internally for the new stream
+ * AVCodecContext.
  *

I don't really see why should this be mentioned in the documentation.

First, it's an internal imlementation detail, which might change in the
future.
Second, it's not even always true, since codec will not be opened if all
the information is provided by the demuxer.
Finally, I don't see why would such an information be useful to the
caller.

And furthermore, no, avcodec_open2 won't be called on the created codec context - at least not by avformat_new_stream (it doesn't contain any calls to avcodec_open2 as far as I can see). The only thing that might call avcodec_open2 is avformat_find_stream_info, which also takes care of closing it again.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to