]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/thp.c
vf_yadif: add an option to enable/disable deinterlacing based on src frame "interlace...
[ffmpeg] / libavformat / thp.c
index 39a8bc2c353fbfd6981a6d64763d0499208d74d1..39419776886e2abe745f2469e317cc2dc01c0899 100644 (file)
@@ -2,24 +2,25 @@
  * THP Demuxer
  * Copyright (c) 2007 Marco Gerards
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include "libavutil/intreadwrite.h"
+#include "libavutil/intfloat_readwrite.h"
 #include "avformat.h"
 
 typedef struct ThpDemuxContext {
@@ -81,7 +82,7 @@ static int thp_read_header(AVFormatContext *s,
     thp->next_frame      = thp->first_frame;
 
     /* Read the component structure.  */
-    url_fseek (pb, thp->compoff, SEEK_SET);
+    avio_seek (pb, thp->compoff, SEEK_SET);
     thp->compcount       = avio_rb32(pb);
 
     /* Read the list of component types.  */
@@ -149,7 +150,7 @@ static int thp_read_packet(AVFormatContext *s,
         if (thp->frame >= thp->framecnt)
             return AVERROR(EIO);
 
-        url_fseek(pb, thp->next_frame, SEEK_SET);
+        avio_seek(pb, thp->next_frame, SEEK_SET);
 
         /* Locate the next frame and read out its size.  */
         thp->next_frame += thp->next_framesz;
@@ -188,10 +189,10 @@ static int thp_read_packet(AVFormatContext *s,
 }
 
 AVInputFormat ff_thp_demuxer = {
-    "thp",
-    NULL_IF_CONFIG_SMALL("THP"),
-    sizeof(ThpDemuxContext),
-    thp_probe,
-    thp_read_header,
-    thp_read_packet
+    .name           = "thp",
+    .long_name      = NULL_IF_CONFIG_SMALL("THP"),
+    .priv_data_size = sizeof(ThpDemuxContext),
+    .read_probe     = thp_probe,
+    .read_header    = thp_read_header,
+    .read_packet    = thp_read_packet
 };