cleanup
This commit is contained in:
parent
08165c06df
commit
c94e2c0f13
|
@ -237,11 +237,9 @@ int FfmpegCamera::Capture(ZMPacket &zm_packet) {
|
|||
dumpPacket(mFormatContext->streams[packet.stream_index], &packet, "ffmpeg_camera in");
|
||||
|
||||
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
|
||||
//audio_packet->codec_type = camera->get_AudioStream()->codecpar->codec_type;
|
||||
zm_packet.codec_type = mFormatContext->streams[packet.stream_index]->codecpar->codec_type;
|
||||
#else
|
||||
zm_packet.codec_type = mFormatContext->streams[packet.stream_index]->codec->codec_type;
|
||||
//audio_packet->codec_type = camera->get_AudioStream()->codec->codec_type;
|
||||
#endif
|
||||
bytes += packet.size;
|
||||
zm_packet.set_packet(&packet);
|
||||
|
@ -372,10 +370,10 @@ int FfmpegCamera::OpenFfmpeg() {
|
|||
#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0)
|
||||
mVideoCodecContext = avcodec_alloc_context3(nullptr);
|
||||
avcodec_parameters_to_context(mVideoCodecContext,
|
||||
mFormatContext->streams[mVideoStreamId]->codecpar);
|
||||
mFormatContext->streams[mVideoStreamId]->codecpar);
|
||||
// this isn't copied.
|
||||
mVideoCodecContext->time_base =
|
||||
mFormatContext->streams[mVideoStreamId]->codec->time_base;
|
||||
mFormatContext->streams[mVideoStreamId]->codec->time_base;
|
||||
#else
|
||||
#endif
|
||||
//mVideoCodecContext = mFormatContext->streams[mVideoStreamId]->codec;
|
||||
|
|
Loading…
Reference in New Issue