[Ffmpeg-cvslog] CVS: ffmpeg/libavformat aiff.c,1.1,1.2
Baptiste Coudurier CVS
bcoudurier
Mon May 15 14:38:37 CEST 2006
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv8406/libavformat
Modified Files:
aiff.c
Log Message:
fix pcm_s24be demuxing, simplify
Index: aiff.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/aiff.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- aiff.c 2 Feb 2006 15:21:19 -0000 1.1
+++ aiff.c 15 May 2006 12:38:33 -0000 1.2
@@ -399,37 +399,20 @@
static int aiff_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
- offset_t pos;
- int res, size;
+ AVStream *st = s->streams[0];
+ int res;
/* End of stream may be reached */
if (url_feof(&s->pb))
return AVERROR_IO;
- /* Need to know if reached the end sound data */
- size = MAX_SIZE;
- if (s->file_size) {
- pos = url_ftell (&s->pb) - s->file_size;
- if (pos >= s->file_size)
- size = 0;
- else if (pos + MAX_SIZE >= s->file_size)
- size = s->file_size - pos;
- }
-
/* Now for that packet */
- res = av_get_packet (&s->pb, pkt, MAX_SIZE);
+ res = av_get_packet(&s->pb, pkt, (MAX_SIZE / st->codec->block_align) * st->codec->block_align);
if (res < 0)
return res;
/* Only one stream in an AIFF file */
pkt->stream_index = 0;
-
- /* Finaly fix the read to a block */
- if (size <= res)
- pkt->size = size - (size % s->streams[0]->codec->block_align);
- else
- pkt->size = res - (res % s->streams[0]->codec->block_align);
-
return 0;
}
More information about the ffmpeg-cvslog
mailing list