/**
* MPEG2VIDEO frame duration table (in 90kHz clock domain)
*/
-const static unsigned int mpeg2video_framedurations[16] = {
+const unsigned int mpeg2video_framedurations[16] = {
0,
3753,
3750,
void parser_enqueue_packet(th_transport_t *t, th_stream_t *st, th_pkt_t *pkt);
+extern const unsigned int mpeg2video_framedurations[16];
+
#endif /* PARSERS_H */
#include "dvb_support.h"
#include "tsdemux.h"
#include "strtab.h"
+#include "parsers.h"
int
psi_section_reassemble(psi_section_t *ps, uint8_t *data, int len,
tv_streamtype_t hts_stream_type;
th_stream_t *st;
char lang[4];
-
+ int frameduration;
if(len < 9)
return -1;
ptr += 5;
len -= 5;
-
+ frameduration = 0;
hts_stream_type = 0;
switch(estype) {
break;
switch(dtag) {
+ case DVB_DESC_VIDEO_STREAM:
+ frameduration = mpeg2video_framedurations[(ptr[0] >> 3) & 0xf];
+ break;
+
case DVB_DESC_LANGUAGE:
memcpy(lang, ptr, 3);
break;
if(hts_stream_type != 0) {
st = transport_add_stream(t, pid, hts_stream_type);
st->st_tb = (AVRational){1, 90000};
-
memcpy(st->st_lang, lang, 4);
+
+ if(st->st_frame_duration == 0)
+ st->st_frame_duration = frameduration;
}
- }
+ }
t->tht_pmt_seen = 1;
return 0;