X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fnsvdec.c;h=72d626af7347f57b1c6f0dae55c36b930c66ab94;hb=482ee63641f4fa50f017538af384aadbceee7a18;hp=b3bb31fd2298b9783ee17c0e921fe2ac7a78c3b6;hpb=537a9e5cc28fe55deedc30953737cff124ac570f;p=ffmpeg diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c index b3bb31fd229..72d626af734 100644 --- a/libavformat/nsvdec.c +++ b/libavformat/nsvdec.c @@ -21,6 +21,7 @@ #include "libavutil/mathematics.h" #include "avformat.h" +#include "internal.h" #include "riff.h" #include "libavutil/dict.h" #include "libavutil/intreadwrite.h" @@ -191,6 +192,7 @@ static const AVCodecTag nsv_codec_video_tags[] = { { CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') }, { CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') }, { CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') }, + { CODEC_ID_VP8, MKTAG('V', 'P', '8', '0') }, /* { CODEC_ID_VP4, MKTAG('V', 'P', '4', ' ') }, { CODEC_ID_VP4, MKTAG('V', 'P', '4', '0') }, @@ -204,6 +206,7 @@ static const AVCodecTag nsv_codec_audio_tags[] = { { CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') }, { CODEC_ID_AAC, MKTAG('A', 'A', 'C', ' ') }, { CODEC_ID_AAC, MKTAG('A', 'A', 'C', 'P') }, + { CODEC_ID_AAC, MKTAG('V', 'L', 'B', ' ') }, { CODEC_ID_SPEEX, MKTAG('S', 'P', 'X', ' ') }, { CODEC_ID_PCM_U16LE, MKTAG('P', 'C', 'M', ' ') }, { CODEC_ID_NONE, 0 }, @@ -438,10 +441,11 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) nsv->vheight = vwidth; if (vtag != T_NONE) { int i; - st = av_new_stream(s, NSV_ST_VIDEO); + st = avformat_new_stream(s, NULL); if (!st) goto fail; + st->id = NSV_ST_VIDEO; nst = av_mallocz(sizeof(NSVStream)); if (!nst) goto fail; @@ -453,7 +457,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) st->codec->height = vheight; st->codec->bits_per_coded_sample = 24; /* depth XXX */ - av_set_pts_info(st, 64, framerate.den, framerate.num); + avpriv_set_pts_info(st, 64, framerate.den, framerate.num); st->start_time = 0; st->duration = av_rescale(nsv->duration, framerate.num, 1000*framerate.den); @@ -469,10 +473,11 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) } if (atag != T_NONE) { #ifndef DISABLE_AUDIO - st = av_new_stream(s, NSV_ST_AUDIO); + st = avformat_new_stream(s, NULL); if (!st) goto fail; + st->id = NSV_ST_AUDIO; nst = av_mallocz(sizeof(NSVStream)); if (!nst) goto fail; @@ -484,7 +489,7 @@ static int nsv_parse_NSVs_header(AVFormatContext *s, AVFormatParameters *ap) st->need_parsing = AVSTREAM_PARSE_FULL; /* for PCM we will read a chunk later and put correct info */ /* set timebase to common denominator of ms and framerate */ - av_set_pts_info(st, 64, 1, framerate.num*1000); + avpriv_set_pts_info(st, 64, 1, framerate.num*1000); st->start_time = 0; st->duration = (int64_t)nsv->duration * framerate.num; #endif