temp->draw_line(x,0, x,vh);
return temp;
}
+ int ww = picon->gui->vicon_thread->view_w;
+ int hh = picon->gui->vicon_thread->view_h;
+ if( !asset->video_data ) {
+ if( !temp ) {
+ temp = new VFrame(0, -1, ww, hh, BC_RGB888, -1);
+ temp->clear_frame();
+ }
+ return temp;
+ }
if( seq_no >= images.size() ) {
MWindow *mwindow = picon->mwindow;
File *file = mwindow->video_cache->check_out(asset, mwindow->edl, 1);
}
if( !temp )
temp = new VFrame(0, -1, asset->width, asset->height, BC_RGB888, -1);
- int ww = picon->gui->vicon_thread->view_w;
- int hh = picon->gui->vicon_thread->view_h;
while( seq_no >= images.size() ) {
file->set_layer(0);
int64_t pos = images.size() / picon->gui->vicon_thread->refresh_rate * frame_rate;
return j;
}
}
- if( display_format == LISTBOX_ICONS ) return -1;
- } // fall through
+ return -1; }
case LISTBOX_TEXT:
if( !gui ) break;
// Text is treed
void VIcon::
draw_vframe(VIconThread *vt, BC_WindowBase *wdw, int x, int y)
{
+ VFrame *vfrm = frame();
+ if( !vfrm ) return;
int sx0 = 0, sx1 = sx0 + vt->view_w;
int sy0 = 0, sy1 = sy0 + vt->view_h;
int dx0 = x, dx1 = dx0 + vw;
int sw = sx1 - sx0, sh = sy1 - sy0;
int dw = dx1 - dx0, dh = dy1 - dy0;
if( dw > 0 && dh > 0 && sw > 0 && sh > 0 )
- wdw->draw_vframe(frame(), dx0,dy0, dw,dh, sx0,sy0, sw,sh);
+ wdw->draw_vframe(vfrm, dx0,dy0, dw,dh, sx0,sy0, sw,sh);
}
void VIconThread::
void ViewPopup::draw_vframe(VFrame *frame)
{
+ if( !frame ) return;
BC_WindowBase::draw_vframe(frame, 0,0, get_w(),get_h());
}
//zmsg(" 7\n");
/* Step back */
if( sideinfo.main_data_begin >= 512 ) return output_offset;
- if( sideinfo.main_data_begin ) {
+// if( sideinfo.main_data_begin ) { /* apparently, zero is legal */
prev_len = sideinfo.main_data_begin;
uint8_t *prev = prev_bsbuf + prev_framesize - prev_len;
//zmsgs(" 7 %ld %d %ld\n", ssize, sideinfo.main_data_begin, prev_framesize);
memcpy(ptr, prev, prev_len);
past_framesize += prev_framesize;
}
- }
+//}
if( ptr && past_framesize >= prev_len ) {
stream->use_ptr(ptr);
for( gr=0; gr<granules; ++gr ) {