h264 ffmpeg: How to initialize ffmpeg to decode NALs created with x264
问题 I have encoded some frames using x264, using x264_encoder_encode and after that I have created AVPackets using a function like this: bool PacketizeNals( uint8_t* a_pNalBuffer, int a_nNalBufferSize, AVPacket* a_pPacket ) { if ( !a_pPacket ) return false; a_pPacket->data = a_pNalBuffer; a_pPacket->size = a_nNalBufferSize; a_pPacket->stream_index = 0; a_pPacket->flags = AV_PKT_FLAG_KEY; a_pPacket->pts = int64_t(0x8000000000000000); a_pPacket->dts = int64_t(0x8000000000000000); } I call this