comparison utils.c @ 2032:af6110a58658 libavformat

init packet before calling the demuxer fixed random/uninitalized AVPacket->pos
author michael
date Sun, 22 Apr 2007 11:07:35 +0000
parents 9a8908eaa2ea
children 1f882c0d0b79
comparison
equal deleted inserted replaced
2031:d3c1ef5b9a2f 2032:af6110a58658
482 482
483 /*******************************************************/ 483 /*******************************************************/
484 484
485 int av_read_packet(AVFormatContext *s, AVPacket *pkt) 485 int av_read_packet(AVFormatContext *s, AVPacket *pkt)
486 { 486 {
487 av_init_packet(pkt);
487 return s->iformat->read_packet(s, pkt); 488 return s->iformat->read_packet(s, pkt);
488 } 489 }
489 490
490 /**********************************************************/ 491 /**********************************************************/
491 492
699 700
700 static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt) 701 static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
701 { 702 {
702 AVStream *st; 703 AVStream *st;
703 int len, ret, i; 704 int len, ret, i;
705
706 av_init_packet(pkt);
704 707
705 for(;;) { 708 for(;;) {
706 /* select current input stream component */ 709 /* select current input stream component */
707 st = s->cur_st; 710 st = s->cur_st;
708 if (st) { 711 if (st) {