Initialize s->opaque before calling url_resetbuf().
authorAurelien Jacobs <aurel@gnuage.org>
Mon, 22 Dec 2008 11:23:00 +0000 (11:23 +0000)
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>
Mon, 22 Dec 2008 11:23:00 +0000 (11:23 +0000)
Fixes a regression test crash for icc 10.1 64 bit.

Patch by Aurelien.

Originally committed as revision 16271 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/aviobuf.c

index b680c1d..d1dc09b 100644 (file)
@@ -40,8 +40,8 @@ int init_put_byte(ByteIOContext *s,
     s->buffer = buffer;
     s->buffer_size = buffer_size;
     s->buf_ptr = buffer;
     s->buffer = buffer;
     s->buffer_size = buffer_size;
     s->buf_ptr = buffer;
-    url_resetbuf(s, write_flag ? URL_WRONLY : URL_RDONLY);
     s->opaque = opaque;
     s->opaque = opaque;
+    url_resetbuf(s, write_flag ? URL_WRONLY : URL_RDONLY);
     s->write_packet = write_packet;
     s->read_packet = read_packet;
     s->seek = seek;
     s->write_packet = write_packet;
     s->read_packet = read_packet;
     s->seek = seek;