<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 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>