diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-03-27 19:09:46 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-03-27 19:09:46 +0000 |
commit | 36031c20330d7822ddc984ea8b35d55f6454e014 (patch) | |
tree | e5a583756edd0182135f64c87ea1525f2519dfb3 | |
parent | 227d1b98a17c41f9b91dd64d5dc6502320a27852 (diff) | |
download | ffmpeg-36031c20330d7822ddc984ea8b35d55f6454e014.tar.gz |
eacdata: fix a memleak, return partial packets and use proper return values.
Originally committed as revision 22702 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/eacdata.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/eacdata.c b/libavformat/eacdata.c index 5e2594c927..5fa22863b8 100644 --- a/libavformat/eacdata.c +++ b/libavformat/eacdata.c @@ -83,10 +83,11 @@ 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 = { |