sanity checks for mkv muxer
This commit is contained in:
parent
3c341d8b44
commit
07df79f2ee
1 changed files with 5 additions and 6 deletions
|
@ -810,10 +810,13 @@ mk_write_frame_i(mk_mux_t *mkm, mk_track *t, th_pkt_t *pkt)
|
|||
int skippable = pkt->pkt_frametype == PKT_B_FRAME;
|
||||
int vkeyframe = SCT_ISVIDEO(t->type) && keyframe;
|
||||
|
||||
uint8_t *data;
|
||||
size_t len;
|
||||
uint8_t *data = pktbuf_ptr(pkt->pkt_payload);
|
||||
size_t len = pktbuf_len(pkt->pkt_payload);
|
||||
const int clusersizemax = 2000000;
|
||||
|
||||
if(!data || len <= 0)
|
||||
return;
|
||||
|
||||
if(pts == PTS_UNSET)
|
||||
// This is our best guess, it might be wrong but... oh well
|
||||
pts = t->nextpts;
|
||||
|
@ -863,10 +866,6 @@ mk_write_frame_i(mk_mux_t *mkm, mk_track *t, th_pkt_t *pkt)
|
|||
addcue(mkm, pts, t->tracknum);
|
||||
}
|
||||
|
||||
|
||||
data = pktbuf_ptr(pkt->pkt_payload);
|
||||
len = pktbuf_len(pkt->pkt_payload);
|
||||
|
||||
if(t->type == SCT_AAC || t->type == SCT_MP4A) {
|
||||
// Skip ADTS header
|
||||
if(len < 7)
|
||||
|
|
Loading…
Add table
Reference in a new issue