Which is it the value of pCodecCtx->codec_id that you pass to avcodec_find_decoder()?

On 07/02/14 10:28, keren happuch wrote:
Hi,

   Im trying to execute a example program given in ffmpeg folder ,


_1.1. Register all formats and codecs_

  av_register_all();
  avcodec_register_all();
  avformat_network_init();

works fine


_1.2. Open video file_

  char              *drone_addr = "http://192.168.1.1:5555";;
  AVFormatContext   *pFormatCtx = NULL;
  while(avformat_open_input(&pFormatCtx, drone_addr, NULL, NULL) != 0)
    printf("Could not open the video file\nRetrying...\n");

works fine



_1.3. Display information_

  // Retrieve stream information
  avformat_find_stream_info(pFormatCtx, NULL);
  // Dump information to standard output
  av_dump_format(pFormatCtx, 0, drone_addr, 0);


works fine



_1.4. Find decoder _

  // Get a pointer to the codec context for the video stream
  // and find the decoder for the video stream
  AVCodecContext    *pCodecCtx;
  AVCodec           *pCodec;
  pCodecCtx = pFormatCtx->streams[0]->codec;
  pCodec    = avcodec_find_decoder(pCodecCtx->codec_id);



the condition fails.. avcodec_find_decoder always fails.. any help Thanks in advance


_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to