kill obnoxious ogg_packet passing from demuxer to decoder

Originally committed as revision 2953 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer
2004-04-04 02:07:15 +00:00
parent 8bfed902f3
commit d76f581ff5
2 changed files with 11 additions and 7 deletions

View File

@@ -226,13 +226,12 @@ static int ogg_read_packet(AVFormatContext *avfcontext, AVPacket *pkt) {
if(next_packet(avfcontext, &op))
return -EIO ;
if(av_new_packet(pkt, sizeof(ogg_packet) + op.bytes) < 0)
if(av_new_packet(pkt, op.bytes) < 0)
return -EIO ;
pkt->stream_index = 0 ;
memcpy(pkt->data, &op, sizeof(ogg_packet)) ;
memcpy(pkt->data + sizeof(ogg_packet), op.packet, op.bytes) ;
memcpy(pkt->data, op.packet, op.bytes);
return sizeof(ogg_packet) + op.bytes ;
return op.bytes;
}