]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/iss.c
vorbiscomment: convert metadata before computing the header's length
[ffmpeg] / libavformat / iss.c
index c722f62d2bf79562f80474bc22155628a65695b8..156af976ca1cecf1174961ea559a5734beca9d25 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 /**
- * @file iss.c
+ * @file
  * Funcom ISS file demuxer
  * @author Jaikrishnan Menon
  * for more information on the .iss file format, visit:
@@ -92,7 +92,7 @@ static av_cold int iss_read_header(AVFormatContext *s, AVFormatParameters *ap)
     st = av_new_stream(s, 0);
     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_IMA_ISS;
     st->codec->channels = stereo ? 2 : 1;
     st->codec->sample_rate = 44100;
@@ -112,8 +112,8 @@ static int iss_read_packet(AVFormatContext *s, AVPacket *pkt)
     IssDemuxContext *iss = s->priv_data;
     int ret = av_get_packet(s->pb, pkt, iss->packet_size);
 
-    if(ret < 0)
-        return ret;
+    if(ret != iss->packet_size)
+        return AVERROR(EIO);
 
     pkt->stream_index = 0;
     pkt->pts = url_ftell(s->pb) - iss->sample_start_pos;