<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Which is it the value of
      pCodecCtx->codec_id that you pass to avcodec_find_decoder()?<br>
      <br>
      <br>
      On 07/02/14 10:28, keren happuch wrote:<br>
    </div>
    <blockquote
cite="mid:CAPu7XETFDpABhL--JY9-Y03E7tgFyOof2eL-t34ma_HNFQPNYg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>Hi,<br>
              <br>
            </div>
               Im trying to execute a example program given in ffmpeg
            folder ,<br>
            <br>
            <br>
            <u>1.1. Register all formats and codecs</u><br>
            <br>
            <div style="font-family:"Courier
              New",Courier,monospace">
                av_register_all(); </div>
            <span style="font-family:"Courier
              New",Courier,monospace">  avcodec_register_all();</span><br>
            <span style="font-family:"Courier
              New",Courier,monospace">  avformat_network_init();<br>
              <br>
            </span></div>
          <span style="font-family:"Courier
            New",Courier,monospace">works fine<br>
            <br>
          </span><br>
          <u>1.2. Open video file</u><br>
          <div style="font-family:"Courier
            New",Courier,monospace">
            <br>
              char              *drone_addr = "<a moz-do-not-send="true"
              href="http://192.168.1.1:5555">http://192.168.1.1:5555</a>";<br>
              AVFormatContext   *pFormatCtx = NULL; </div>
          <div style="font-family:"Courier
            New",Courier,monospace">
              while(avformat_open_input(&pFormatCtx, drone_addr,
            NULL, NULL) != 0) </div>
          <span style="font-family:"Courier
            New",Courier,monospace">    printf("Could not open the
            video file\nRetrying...\n");</span><br>
          <span style="font-family:"Courier
            New",Courier,monospace"><br>
          </span></div>
        <span style="font-family:"Courier
          New",Courier,monospace">works fine<br>
          <br>
          <br>
        </span><br>
        <u>1.3. Display information</u><br>
        <br>
        <div style="font-family:"Courier
          New",Courier,monospace">
            // Retrieve stream information<br>
            avformat_find_stream_info(pFormatCtx, NULL);<br>
            // Dump information to standard output<br>
            av_dump_format(pFormatCtx, 0, drone_addr, 0);<br>
          <br>
          <br>
        </div>
        <div style="font-family:"Courier
          New",Courier,monospace">works fine<br>
          <br>
          <br>
          <br>
          <u>1.4. Find decoder </u><br>
          <br>
          <span style="font-family:"Courier
            New",Courier,monospace">  // Get a pointer to the codec
            context for the video stream</span><br>
          <span style="font-family:"Courier
            New",Courier,monospace">  // and find the decoder for
            the video stream</span><br>
          <span style="font-family:"Courier
            New",Courier,monospace">  AVCodecContext    *pCodecCtx;</span><br>
          <span style="font-family:"Courier
            New",Courier,monospace">  AVCodec           *pCodec;</span><br>
          <span style="font-family:"Courier
            New",Courier,monospace">  pCodecCtx =
            pFormatCtx->streams[0]->codec;</span><br>
          <span style="font-family:"Courier
            New",Courier,monospace">  pCodec    =
            avcodec_find_decoder(pCodecCtx->codec_id);<br>
            <br>
            <br>
            <br>
          </span></div>
        <div style="font-family:"Courier
          New",Courier,monospace">
          <span style="font-family:"Courier
            New",Courier,monospace">the condition fails..
            avcodec_find_decoder always fails.. any help Thanks in
            advance<br>
          </span></div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Libav-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a>
<a class="moz-txt-link-freetext" href="http://ffmpeg.org/mailman/listinfo/libav-user">http://ffmpeg.org/mailman/listinfo/libav-user</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>