hi guy's,
i have a problem with the avcodec_encode_video2. i grab a frame from my camera and want to write that into a stream. but avcodec_encode_video2 is generating a segmentation fault.
the main loop is quit simple:
 

 

      for(;;) {

        if(av_read_frame(formatCtxIn, pktIn) >= 0) {
          av_dup_packet(pktIn);
 
          int fff;
          if(avcodec_decode_video2(codecCtxIn, frame, &fff, pktIn) < 0)
            std::cout << "shit frame" << std::endl;
 
          if(!fff)
            return 0;  // ok
 
                  // segmentation fault
          if(avcodec_encode_video2(streamOut->codec, pktOut, frame, &fff) < 0)
            std::cout << "shit frame" << std::endl;
        }
      }
 
do anybody has any advice for me, why this is happening.
 
more code and information you can read here: http://stackoverflow.com/questions/16987749/segmetation-fault-while-avcodec-encode-video2
 
cheers
pete
 
 
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to