diff options
Diffstat (limited to 'libavformat/pmpdec.c')
-rw-r--r-- | libavformat/pmpdec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c index ba40003359..88b8998ad9 100644 --- a/libavformat/pmpdec.c +++ b/libavformat/pmpdec.c @@ -47,7 +47,7 @@ static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) { int srate, channels; int i; uint64_t pos; - AVStream *vst = av_new_stream(s, 0); + AVStream *vst = avformat_new_stream(s, NULL); if (!vst) return AVERROR(ENOMEM); vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; @@ -90,9 +90,10 @@ static int pmp_header(AVFormatContext *s, AVFormatParameters *ap) { srate = avio_rl32(pb); channels = avio_rl32(pb) + 1; for (i = 1; i < pmp->num_streams; i++) { - AVStream *ast = av_new_stream(s, i); + AVStream *ast = avformat_new_stream(s, NULL); if (!ast) return AVERROR(ENOMEM); + ast->id = i; ast->codec->codec_type = AVMEDIA_TYPE_AUDIO; ast->codec->codec_id = audio_codec_id; ast->codec->channels = channels; |