]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ivfdec.c
copy_block: Change type of array stride parameters to ptrdiff_t
[ffmpeg] / libavformat / ivfdec.c
index 52a370e65234822c38d03adb3ba8086eba0e9f88..a602f7c9ba20e3c1fcf7851a2cf499c6b66a2b50 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include "avformat.h"
+#include "internal.h"
 #include "riff.h"
 #include "libavutil/intreadwrite.h"
 
@@ -31,7 +32,7 @@ static int probe(AVProbeData *p)
     return 0;
 }
 
-static int read_header(AVFormatContext *s, AVFormatParameters *ap)
+static int read_header(AVFormatContext *s)
 {
     AVStream *st;
     AVRational time_base;
@@ -45,11 +46,11 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
         return AVERROR(ENOMEM);
 
 
-    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
-    st->codec->codec_tag  = avio_rl32(s->pb);
-    st->codec->codec_id   = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag);
-    st->codec->width      = avio_rl16(s->pb);
-    st->codec->height     = avio_rl16(s->pb);
+    st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+    st->codecpar->codec_tag  = avio_rl32(s->pb);
+    st->codecpar->codec_id   = ff_codec_get_id(ff_codec_bmp_tags, st->codecpar->codec_tag);
+    st->codecpar->width      = avio_rl16(s->pb);
+    st->codecpar->height     = avio_rl16(s->pb);
     time_base.den         = avio_rl32(s->pb);
     time_base.num         = avio_rl32(s->pb);
     st->duration          = avio_rl64(s->pb);
@@ -61,7 +62,7 @@ static int read_header(AVFormatContext *s, AVFormatParameters *ap)
         return AVERROR_INVALIDDATA;
     }
 
-    av_set_pts_info(st, 64, time_base.num, time_base.den);
+    avpriv_set_pts_info(st, 64, time_base.num, time_base.den);
 
     return 0;
 }
@@ -85,6 +86,6 @@ AVInputFormat ff_ivf_demuxer = {
     .read_probe     = probe,
     .read_header    = read_header,
     .read_packet    = read_packet,
-    .flags= AVFMT_GENERIC_INDEX,
-    .codec_tag = (const AVCodecTag*[]){ff_codec_bmp_tags, 0},
+    .flags          = AVFMT_GENERIC_INDEX,
+    .codec_tag      = (const AVCodecTag* const []){ ff_codec_bmp_tags, 0 },
 };