<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    HI<br>
    <br>
    I was using ffmpeg version 1.2.1<br>
    <br>
    I wanted to use avio_alloc_context api. there was confusion about
    third argument of avio_alloc_context<br>
    in comment above the api, developers had said that::<br>
    " @param write_flag Set to 1 if the buffer should be writable, 0
    otherwise."<br>
    <br>
    <b>but when i debug the code of muxing example,then i found that
      they </b><b>flags value is 2 </b><br>
    (  (gdb) print h->flags ; $4 = 2)<br>
    <br>
    <b>through gdb also it look like 2 </b><br>
    <br>
    <br>
    Breakpoint 3, avio_alloc_context (buffer=0x8f6e980 "\310\347\366\b",
    buffer_size=32768, write_flag=2, opaque=0x8f6e940,
    read_packet=0x805faf7 <ffurl_read>, <br>
        write_packet=0x805fb8a <ffurl_write>, seek=0x805fbef
    <ffurl_seek>) at libavformat/aviobuf.c:118<br>
    118         AVIOContext *s = av_mallocz(sizeof(AVIOContext));<br>
    <br>
    <br>
    <br>
    <b>Do any one know what should i pass as third argument 1 or 2, if i
      am allocating   io of output </b><b><br>
    </b><b>means i need to write </b><b><br>
    </b><br>
    <br>
    <br>
    thanks<br>
    anshul<br>
  </body>
</html>