diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-04-22 11:07:35 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-04-22 11:07:35 +0000 |
commit | b237eb800d038f9f73347ae4494cbb86d7f656a4 (patch) | |
tree | e3531584c46323ecec3169ad2a1caadd02622cd2 /libavformat/utils.c | |
parent | 756fb7fea14530916791c2e239d853b433371dcd (diff) | |
download | ffmpeg-b237eb800d038f9f73347ae4494cbb86d7f656a4.tar.gz |
init packet before calling the demuxer
fixed random/uninitalized AVPacket->pos
Originally committed as revision 8781 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index ce05fa0b99..59ee8df8bb 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -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; |