Browse Source

init packet before calling the demuxer

fixed random/uninitalized AVPacket->pos

Originally committed as revision 8781 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 18 years ago
parent
commit
b237eb800d
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/utils.c

+ 3
- 0
libavformat/utils.c View File

@@ -484,6 +484,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,

int av_read_packet(AVFormatContext *s, AVPacket *pkt)
{
av_init_packet(pkt);
return s->iformat->read_packet(s, pkt);
}

@@ -702,6 +703,8 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
AVStream *st;
int len, ret, i;

av_init_packet(pkt);

for(;;) {
/* select current input stream component */
st = s->cur_st;


Loading…
Cancel
Save