Early church leaders believe that the words they delivered from the pulpit constituted the revealed word of the Lord and the doctrine of the church. The view that the living prophet and apostles delivered words which constituted doctrine was believed from the days of the early church through at least about the 1970s.
Brigham Young stated:
“The Lord is in our midst. He teaches the people continually. I have never yet preached a sermon and sent it out to the children of men, that they may not call Scripture. Let me have the privilege of correcting a sermon, and it is as good Scripture as they deserve. The people have the oracles of God continually. In the days of Joseph, revelation was given and written, and the people were driven from city to city and place to place, until we were led into these mountains. Let this go to the people with “Thus saith the Lord,” and if they do not obey it, you will see the chastening hand of the Lord upon them…”
George Q. Cannon of the first presidency stated in 1861:
The Journal of Discourses deservedly ranks as one of the standard works of the Church, and every rightminded Saint will certainly welcome with joy every Number as it comes forth from the press as an additional reflector of ‘the light that shines from Zion’s hill.
In 1956, J. Reuben Clark clarified that only apostles (Quorum of 12) could make or interpret doctrine of the church on an official level:
They possess a special gift; they are sustained as prophets, seers, and revelators, which gives them a special spiritual endowment in connection with their teaching of the people. They have the right, the power, and authority to declare the mind and will of God to his people, subject to the overall power and authority of the President of the Church. Others of the General Authorities are not given this special spiritual endowment and authority covering their teaching; they have a resulting limitation, and the resulting limitation upon their power and authority in teaching applies to every other officer and member of the Church, for none of them is spiritually endowed as a prophet, seer, and revelator. Furthermore . . . the President of the Church has a further and special spiritual endowment in this respect, for he is the prophet, seer, and revelator of the whole church. 
In 1956 and 1959, two books were published by Joseph Fielding Smith and Bruce R. McConkie entitled, “Doctrines of Salvation” and “Mormon Doctrine”. The later served for half a century as a pseudo-official resource for members until it went out of print in 2010.
In the 1960s, Apostle LeGrand Richards took a slightly more restrictive approach to doctrine of the past when he responded to an inquiry in a letter:
Your next question: Can the Journal of Discourses be used as doctrine if the man speaking says, ‘Thus saith the Lord’?
I cannot answer that question because I don’t know what part of the Journal of Discourses you have in mind. I would have to know just what you were referring to.
President Howard W. Hunter taught:
Our modern-day prophets have encouraged us to make the reading of the conference editions of our Church magazines an important and regular part of our personal study. Thus, general conference becomes, in a sense, a supplement to or an extension of the Doctrine and Covenants. In addition to the conference issues of the Church magazines, the First Presidency writes monthly articles that contain inspired counsel for our welfare.
In the past, national media spotlights on the church sometimes lead to poor coverage and highlight some of the stranger teachings of Mormonism. In Jan 2007, Mitt Romney launched a highly publicized bid for the Republican Presidential nomination. In May of that year, the church narrowed this definition significantly when it posted the following on its official website:
Not every statement made by a Church leader, past or present, necessarily constitutes doctrine. A single statement made by a single leader on a single occasion often represents a personal, though well-considered, opinion, but is not meant to be officially binding for the whole Church. With divine inspiration, the First Presidency (the prophet and his two counselors) and the Quorum of the Twelve Apostles (the second-highest governing body of the Church) counsel together to establish doctrine that is consistently proclaimed in official Church publications. This doctrine resides in the four “standard works” of scripture (…), official declarations and proclamations, and the Articles of Faith. Isolated statements are often taken out of context, leaving their original meaning distorted.
Some doctrines are more important than others and might be considered core doctrines. For example, the precise location of the Garden of Eden is far less important than doctrine about Jesus Christ and His atoning sacrifice. The mistake that public commentators often make is taking an obscure teaching that is peripheral to the Church’s purpose and placing it at the very center. This is especially common among reporters or researchers who rely on how other Christians interpret Latter-day Saint doctrine.
In Apr 2012, Christofferson reiterated the above and added clarification indicating the doctrine could come either by inspiration to the president of the church or via decisions taken by councils:
The President of the Church may announce or interpret doctrines based on revelation to him (…D&C 138). Doctrinal exposition may also come through the combined council of the First Presidency and Quorum of the Twelve Apostles (… Official Declaration 2). Council deliberations will often include a weighing of canonized scriptures, the teachings of Church leaders, and past practice. But in the end, just as in the New Testament Church, the objective is not simply consensus among council members but revelation from God. It is a process involving both reason and faith for obtaining the mind and will of the Lord.
At the same time it should be remembered that not every statement made by a Church leader, past or present, necessarily constitutes doctrine. It is commonly understood in the Church that a statement made by one leader on a single occasion often represents a personal, though well-considered, opinion, not meant to be official or binding for the whole Church. The Prophet Joseph Smith taught that “a prophet [is] a prophet only when he [is] acting as such.”
As summarized in 2013 in the official church periodical:
The prophet and President of the Church can receive revelation individually that becomes doctrine when it is sustained by the united voice of the First Presidency and Quorum of the Twelve Apostles
Many church leaders define doctrine as being something which is unchangeable:
Our understanding of God’s plan and His doctrine gives us an eternal perspective that does not allow us to condone such behaviors or to find justification in the laws that permit them. And, unlike other organizations that can change their policies and even their doctrines, our policies are determined by the truths God has identified as unchangeable.”
Dr. Greg Prince offered a slightly differing view of Mormon doctrine when he explained:
I have yet to encounter a single, significant doctrine within Mormonism that has undergone no change since the earliest days of the restoration. It is literally an article of our faith that we don’t have it all and that we believe that there is much yet much yet for God to reveal. Rather than denying or fighting doctrinal evolution, we should welcome it and pray for more.
Nelson, the current prophet expressed the need for doctrinal change in a different way:
“We’re witnesses to a process of restoration,” said the prophet. “If you think the Church has been fully restored, you’re just seeing the beginning. There is much more to come. … Wait till next year. And then the next year. Eat your vitamin pills. Get your rest. It’s going to be exciting.”
 Journal of Discourses, 13:95.
 The Journal of discourses was an annual publication of the writings and teachings of the presidency of the church and some apostles which was regularly published between 1855 and 1886. It is roughly the equivalent of the modern General Conference Ensign issues.
 “Preface”, Journal of Discourses 8:3.
 Quoted in Roy W. Doxey, The Latter-day Prophets and the Doctrine and Covenants (Salt Lake City: Deseret Book Co., 1963), 1:ix–x. See https://speeches.byu.edu/talks/roy-w-doxey_accept-divine-counsel/
 Salt Lake Tribune, Landmark ‘Mormon Doctrine’ goes out of print, Peggy Stack, May 21, 2010. https://archive.sltrib.com/story.php?ref=/ci_15137409
 Letter to Morris L. Reynolds, ,May 16, 1966 as quoted in Tanner, The Changing World of Mormonism, pg 437.
 The Teachings of Howard W. Hunter, ed. Clyde J. Williams (1997), 212; emphasis added, quoted in Teachings of the Living Prophets Student Manual, 73; bold in original.
 This place is Adam-ondi-ahmen, in Missouri USA, and it is doctrine (being officially included in the Doctrine and Covenants)…
 Liahona, May 2012, The Doctrine of Christ, D. Todd Christofferson https://www.churchofjesuschrist.org/study/liahona/2012/05/sunday-morning-session/the-doctrine-of-christ?lang=eng
 Ensign, Sept 2013, How is Doctrine Established https://www.churchofjesuschrist.org/study/ensign/2013/09/how-is-doctrine-established?lang=eng
 LDS General Conference, Oct 2011, Dallin H. Oaks, No Other Gods. https://www.lds.org/general-conference/2013/10/no-other-gods?lang=eng Though probably not intended as such, this statement is somewhat ironic considering the change being criticized (i.e. changing marital practices) is something which has happened multiple times in the LDS church.