# HG changeset patch # User reimar # Date 1269716986 0 # Node ID d7f41380f52c8c54c0acec98785e3b900f9feb2d # Parent 395592984ef0eabab1f8260b405547b1e9c1be19 eacdata: fix a memleak, return partial packets and use proper return values. diff -r 395592984ef0 -r d7f41380f52c eacdata.c --- a/eacdata.c Fri Mar 26 16:04:38 2010 +0000 +++ b/eacdata.c Sat Mar 27 19:09:46 2010 +0000 @@ -83,10 +83,11 @@ 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 = {