Mercurial > mplayer.hg
comparison libmpdemux/muxer_lavf.c @ 34540:2b07cfa69882
Use avformat_new_stream.
While av_new_stream still exists in ffmpeg avformat.h,
the implementation was removed so we can't really use
it anymore.
author | reimar |
---|---|
date | Sat, 28 Jan 2012 13:06:59 +0000 |
parents | 88bd2174f616 |
children | ceb148e1fe31 |
comparison
equal
deleted
inserted
replaced
34539:88bd2174f616 | 34540:2b07cfa69882 |
---|---|
145 free(stream); | 145 free(stream); |
146 return NULL; | 146 return NULL; |
147 } | 147 } |
148 stream->priv = spriv; | 148 stream->priv = spriv; |
149 | 149 |
150 spriv->avstream = av_new_stream(priv->oc, 1); | 150 spriv->avstream = avformat_new_stream(priv->oc, NULL); |
151 if(!spriv->avstream) | 151 if(!spriv->avstream) |
152 { | 152 { |
153 mp_msg(MSGT_MUXER, MSGL_ERR, "Could not allocate avstream, EXIT.\n"); | 153 mp_msg(MSGT_MUXER, MSGL_ERR, "Could not allocate avstream, EXIT.\n"); |
154 return NULL; | 154 return NULL; |
155 } | 155 } |
156 spriv->avstream->id = 1; | |
156 | 157 |
157 ctx = spriv->avstream->codec; | 158 ctx = spriv->avstream->codec; |
158 ctx->codec_id = CODEC_ID_NONE; | 159 ctx->codec_id = CODEC_ID_NONE; |
159 switch(type) | 160 switch(type) |
160 { | 161 { |