summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miavd/ffmpeg_encoder.cc5
-rw-r--r--miavd/ffoutput.cc10
-rw-r--r--miavd/ffoutput.h2
3 files changed, 10 insertions, 7 deletions
diff --git a/miavd/ffmpeg_encoder.cc b/miavd/ffmpeg_encoder.cc
index 2f73c4c..4f58f08 100644
--- a/miavd/ffmpeg_encoder.cc
+++ b/miavd/ffmpeg_encoder.cc
@@ -124,7 +124,8 @@ void FFMpegEncoder::encode(Frame* frame)
vfrm->avframe = avcodec_alloc_frame();
vfrm->codec_context = dvvcontext;
int got_picture;
- int pos = avcodec_decode_video(dvvcontext, vfrm->avframe, &got_picture, frame->data, frame->size);
+
+ avcodec_decode_video(dvvcontext, vfrm->avframe, &got_picture, frame->data, frame->size);
if(!got_picture)
MIaV::info->warn("Decoding did not result in a picture!");
output->writeFrame(vfrm);
@@ -163,7 +164,7 @@ void FFMpegEncoder::encode(Frame* frame)
}
// Decode audio using libdv
- int frames = dv_decode_full_audio( decoder, frame->data, audio_buffer );
+ dv_decode_full_audio( decoder, frame->data, audio_buffer );
}
diff --git a/miavd/ffoutput.cc b/miavd/ffoutput.cc
index 963e694..f8d0b20 100644
--- a/miavd/ffoutput.cc
+++ b/miavd/ffoutput.cc
@@ -321,13 +321,13 @@ void FFOutput::writeFrame(FFFrame *frame)
if(frame == NULL) return;
int ret = 0;
int stream_index = -1;
- int64_t pts;
- int64_t dts;
- int pos = 0;
+ int64_t pts = 0;
+ //int64_t dts;
+ //int pos = 0;
// printf("Now: %lld\n", av_gettime());
- if(frame->pts == AV_NOPTS_VALUE) frame->pts = av_gettime();
+ if((uint64_t)frame->pts == AV_NOPTS_VALUE) frame->pts = av_gettime();
if(frame->pts == 0) frame->pts = av_gettime();
switch(frame->codec_context->codec->type) {
@@ -358,7 +358,7 @@ void FFOutput::writeFrame(FFFrame *frame)
}
// printf("Now: %lld\n", av_gettime());
- if(pts == AV_NOPTS_VALUE) pts = av_gettime();
+ if((uint64_t)pts == AV_NOPTS_VALUE) pts = av_gettime();
if(pts == 0) pts = av_gettime();
if(ret > 0){
diff --git a/miavd/ffoutput.h b/miavd/ffoutput.h
index ce4f83f..33cf872 100644
--- a/miavd/ffoutput.h
+++ b/miavd/ffoutput.h
@@ -27,6 +27,8 @@
#ifndef __MIAV_FFOUTPUT_H__
#define __MIAV_FFOUTPUT_H__
+#include <stdint.h>
+
extern "C" {
#include <ffmpeg/avformat.h>
#include <ffmpeg/avcodec.h>