mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
eacdata: fix a memleak, return partial packets and use proper return values.
Originally committed as revision 22702 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
227d1b98a1
commit
36031c2033
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user