]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/eacdata.c
In mov muxer, mux adpcm_ms and adpcm_ima_wav the way quicktime supports it
[ffmpeg] / libavformat / eacdata.c
index f4ea2f2e98942e0eec70d6237188d9bee8f8a12f..809b190dd1f6cc4caf26d61f28650768b295b7ea 100644 (file)
@@ -20,9 +20,9 @@
  */
 
 /**
- * @file libavformat/eacdata.c
+ * @file
  * Electronic Arts cdata Format Demuxer
- * by Peter Ross (suxen_drol at hotmail dot com)
+ * by Peter Ross (pross@xvid.org)
  *
  * Technical details here:
  *  http://wiki.multimedia.cx/index.php?title=EA_Command_And_Conquer_3_Audio_Codec
@@ -67,7 +67,7 @@ static int cdata_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_tag = 0; /* no fourcc */
     st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS;
     st->codec->channels = cdata->channels;
@@ -83,13 +83,14 @@ static int cdata_read_packet(AVFormatContext *s, AVPacket *pkt)
     CdataDemuxContext *cdata = s->priv_data;
     int packet_size = 76*cdata->channels;
 
-    if (av_get_packet(s->pb, pkt, packet_size) != packet_size)
-        return AVERROR(EIO);
+    int ret = av_get_packet(s->pb, pkt, packet_size);
+    if (ret < 0)
+        return ret;
     pkt->pts = cdata->audio_pts++;
-    return 1;
+    return 0;
 }
 
-AVInputFormat ea_cdata_demuxer = {
+AVInputFormat ff_ea_cdata_demuxer = {
     "ea_cdata",
     NULL_IF_CONFIG_SMALL("Electronic Arts cdata"),
     sizeof(CdataDemuxContext),