]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/thp.c
Associate .tga with format image2.
[ffmpeg] / libavformat / thp.c
index f1cc8ae26bff7e0cf16c98d39f0c34fb17f234b3..82966dde7e42e0d19319ab636470251747ee6d95 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * THP Demuxer
- * Copyright (c) 2007 Marco Gerards.
+ * Copyright (c) 2007 Marco Gerards
  *
  * This file is part of FFmpeg.
  *
@@ -19,7 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-
+#include "libavutil/intreadwrite.h"
 #include "avformat.h"
 
 typedef struct ThpDemuxContext {
@@ -57,7 +57,7 @@ static int thp_read_header(AVFormatContext *s,
 {
     ThpDemuxContext *thp = s->priv_data;
     AVStream *st;
-    ByteIOContext *pb = &s->pb;
+    ByteIOContext *pb = s->pb;
     int i;
 
     /* Read the file header.  */
@@ -100,7 +100,7 @@ static int thp_read_header(AVFormatContext *s,
             /* The denominator and numerator are switched because 1/fps
                is required.  */
             av_set_pts_info(st, 64, thp->fps.den, thp->fps.num);
-            st->codec->codec_type = CODEC_TYPE_VIDEO;
+            st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
             st->codec->codec_id = CODEC_ID_THP;
             st->codec->codec_tag = 0;  /* no fourcc */
             st->codec->width = get_be32(pb);
@@ -120,7 +120,7 @@ static int thp_read_header(AVFormatContext *s,
             if (!st)
                 return AVERROR(ENOMEM);
 
-            st->codec->codec_type = CODEC_TYPE_AUDIO;
+            st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
             st->codec->codec_id = CODEC_ID_ADPCM_THP;
             st->codec->codec_tag = 0;  /* no fourcc */
             st->codec->channels    = get_be32(pb); /* numChannels.  */
@@ -140,7 +140,7 @@ static int thp_read_packet(AVFormatContext *s,
                             AVPacket *pkt)
 {
     ThpDemuxContext *thp = s->priv_data;
-    ByteIOContext *pb = &s->pb;
+    ByteIOContext *pb = s->pb;
     int size;
     int ret;
 
@@ -189,7 +189,7 @@ static int thp_read_packet(AVFormatContext *s,
 
 AVInputFormat thp_demuxer = {
     "thp",
-    "THP",
+    NULL_IF_CONFIG_SMALL("THP"),
     sizeof(ThpDemuxContext),
     thp_probe,
     thp_read_header,