]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/thp.c
Deprecate av_fifo_realloc(). av_fifo_realloc2() should be used instead.
[ffmpeg] / libavformat / thp.c
index 7f9a8881ca49c9b0f276692aa6ff36f0e104dc9d..434bc297a49e9adf927c6bb223c1e0f98783bee8 100644 (file)
@@ -21,7 +21,6 @@
 
 
 #include "avformat.h"
-#include "allformats.h"
 
 typedef struct ThpDemuxContext {
     int              version;
@@ -58,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.  */
@@ -141,14 +140,14 @@ 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;
 
     if (thp->audiosize == 0) {
         /* Terminate when last frame is reached.  */
         if (thp->frame >= thp->framecnt)
-            return AVERROR_IO;
+            return AVERROR(EIO);
 
         url_fseek(pb, thp->next_frame, SEEK_SET);
 
@@ -169,7 +168,7 @@ static int thp_read_packet(AVFormatContext *s,
         ret = av_get_packet(pb, pkt, size);
         if (ret != size) {
             av_free_packet(pkt);
-            return AVERROR_IO;
+            return AVERROR(EIO);
         }
 
         pkt->stream_index = thp->video_stream_index;
@@ -177,7 +176,7 @@ static int thp_read_packet(AVFormatContext *s,
         ret = av_get_packet(pb, pkt, thp->audiosize);
         if (ret != thp->audiosize) {
             av_free_packet(pkt);
-            return AVERROR_IO;
+            return AVERROR(EIO);
         }
 
         pkt->stream_index = thp->audio_stream_index;
@@ -190,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,