Commit 352448c6 authored by reimar's avatar reimar

eacdata: fix a memleak, return partial packets and use proper return values.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22702 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 943948f1
...@@ -83,10 +83,11 @@ static int cdata_read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -83,10 +83,11 @@ static int cdata_read_packet(AVFormatContext *s, AVPacket *pkt)
CdataDemuxContext *cdata = s->priv_data; CdataDemuxContext *cdata = s->priv_data;
int packet_size = 76*cdata->channels; int packet_size = 76*cdata->channels;
if (av_get_packet(s->pb, pkt, packet_size) != packet_size) int ret = av_get_packet(s->pb, pkt, packet_size);
return AVERROR(EIO); if (ret < 0)
return ret;
pkt->pts = cdata->audio_pts++; pkt->pts = cdata->audio_pts++;
return 1; return 0;
} }
AVInputFormat ea_cdata_demuxer = { AVInputFormat ea_cdata_demuxer = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment