diff options
author | Liong Sauw Ming <ming@teluu.com> | 2011-10-27 10:22:39 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2011-10-27 10:22:39 +0000 |
commit | cfde880340891a1048d10da9ec15377422134e73 (patch) | |
tree | 65bde691728ada7167fa4ca7dfad69a1fe745939 | |
parent | 2ac559ed65e2000c4994ee5406a871dc27e02159 (diff) |
Re #1252 (misc): Add codec initialization before opening it in pjmedia stream
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/1.x@3868 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r-- | pjmedia/src/pjmedia/stream.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia/stream.c b/pjmedia/src/pjmedia/stream.c index 8313c401..eae1398a 100644 --- a/pjmedia/src/pjmedia/stream.c +++ b/pjmedia/src/pjmedia/stream.c @@ -2054,6 +2054,11 @@ PJ_DEF(pj_status_t) pjmedia_stream_create( pjmedia_endpt *endpt, if (stream->codec_param.setting.frm_per_pkt < 1) stream->codec_param.setting.frm_per_pkt = 1; + /* Init the codec. */ + status = stream->codec->op->init(stream->codec, pool); + if (status != PJ_SUCCESS) + goto err_cleanup; + /* Open the codec. */ status = stream->codec->op->open(stream->codec, &stream->codec_param); if (status != PJ_SUCCESS) |