Commit 3006f46e authored by michael's avatar michael

init packet before calling the demuxer

fixed random/uninitalized AVPacket->pos


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8781 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 671bfe5f
...@@ -484,6 +484,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename, ...@@ -484,6 +484,7 @@ int av_open_input_file(AVFormatContext **ic_ptr, const char *filename,
int av_read_packet(AVFormatContext *s, AVPacket *pkt) int av_read_packet(AVFormatContext *s, AVPacket *pkt)
{ {
av_init_packet(pkt);
return s->iformat->read_packet(s, pkt); return s->iformat->read_packet(s, pkt);
} }
...@@ -702,6 +703,8 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt) ...@@ -702,6 +703,8 @@ static int av_read_frame_internal(AVFormatContext *s, AVPacket *pkt)
AVStream *st; AVStream *st;
int len, ret, i; int len, ret, i;
av_init_packet(pkt);
for(;;) { for(;;) {
/* select current input stream component */ /* select current input stream component */
st = s->cur_st; st = s->cur_st;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment