Commit 038ff57f authored by Ghislain MARY's avatar Ghislain MARY

Always report video decoding errors. The interval between each sending of VFU...

Always report video decoding errors. The interval between each sending of VFU requests is handled at a higher level.
parent d51333b6
......@@ -38,7 +38,6 @@ typedef struct _DecData{
unsigned int packet_num;
uint8_t *bitstream;
int bitstream_size;
uint64_t last_error_reported_time;
bool_t first_image_decoded;
}DecData;
......@@ -79,7 +78,6 @@ static void dec_init(MSFilter *f){
d->outbuf.h=0;
d->bitstream_size=65536;
d->bitstream=ms_malloc0(d->bitstream_size);
d->last_error_reported_time=0;
f->data=d;
}
......@@ -279,10 +277,7 @@ static void dec_process(MSFilter *f){
len=avcodec_decode_video2(&d->av_context,&orig,&got_picture,&pkt);
if (len<=0) {
ms_warning("ms_AVdecoder_process: error %i.",len);
if ((f->ticker->time - d->last_error_reported_time)>5000 || d->last_error_reported_time==0) {
d->last_error_reported_time=f->ticker->time;
ms_filter_notify_no_arg(f,MS_VIDEO_DECODER_DECODING_ERRORS);
}
ms_filter_notify_no_arg(f,MS_VIDEO_DECODER_DECODING_ERRORS);
break;
}
if (got_picture) {
......
......@@ -43,7 +43,6 @@ typedef struct DecState{
enum PixelFormat output_pix_fmt;
uint8_t dci[512];
int dci_size;
uint64_t last_error_reported_time;
bool_t snow_initialized;
bool_t first_image_decoded;
}DecState;
......@@ -680,10 +679,7 @@ static void dec_process_frame(MSFilter *f, mblk_t *inm){
len=avcodec_decode_video2(&s->av_context,&orig,&got_picture,&pkt);
if (len<=0) {
ms_warning("ms_AVdecoder_process: error %i.",len);
if ((f->ticker->time - s->last_error_reported_time)>5000 || s->last_error_reported_time==0) {
s->last_error_reported_time=f->ticker->time;
ms_filter_notify_no_arg(f,MS_VIDEO_DECODER_DECODING_ERRORS);
}
ms_filter_notify_no_arg(f,MS_VIDEO_DECODER_DECODING_ERRORS);
break;
}
if (got_picture) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment