Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
service: elementary_stream: remove unused es_vbv_size / es_vbv_delay
  • Loading branch information
perexg committed Nov 23, 2015
1 parent 851aebb commit f803f9d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/parsers/parser_h264.c
Expand Up @@ -432,10 +432,10 @@ h264_decode_slice_header(elementary_stream_t *st, bitstream_t *bs, int *pkttype,
d = 3000; /* 90000/30 = 3000 : 30fps */
}

#if 0
if (sps->cbpsize)
st->es_vbv_size = sps->cbpsize;

st->es_vbv_delay = -1;
#endif

width = sps->width;
height = sps->height * (2 - sps->mbs_only_flag);
Expand Down
16 changes: 10 additions & 6 deletions src/parsers/parsers.c
Expand Up @@ -944,7 +944,7 @@ static int
parse_mpeg2video_pic_start(service_t *t, elementary_stream_t *st, int *frametype,
bitstream_t *bs)
{
int v, pct;
int pct;

if(bs->len < 29)
return PARSER_RESET;
Expand All @@ -957,11 +957,13 @@ parse_mpeg2video_pic_start(service_t *t, elementary_stream_t *st, int *frametype

*frametype = pct;

v = read_bits(bs, 16); /* vbv_delay */
#if 0
int v = read_bits(bs, 16); /* vbv_delay */
if(v == 0xffff)
st->es_vbv_delay = -1;
else
st->es_vbv_delay = v;
#endif
return 0;
}

Expand Down Expand Up @@ -1025,7 +1027,7 @@ static int
parse_mpeg2video_seq_start(service_t *t, elementary_stream_t *st,
bitstream_t *bs)
{
int v, width, height, aspect;
int width, height, aspect, duration;

if(bs->len < 61)
return 1;
Expand All @@ -1037,13 +1039,15 @@ parse_mpeg2video_seq_start(service_t *t, elementary_stream_t *st,
st->es_aspect_num = mpeg2_aspect[aspect][0];
st->es_aspect_den = mpeg2_aspect[aspect][1];

int duration = mpeg2video_framedurations[read_bits(bs, 4)];
duration = mpeg2video_framedurations[read_bits(bs, 4)];

v = read_bits(bs, 18) * 400;
skip_bits(bs, 18);
skip_bits(bs, 1);

v = read_bits(bs, 10) * 16 * 1024 / 8;
#if 0
int v = read_bits(bs, 10) * 16 * 1024 / 8;
st->es_vbv_size = v;
#endif

parser_set_stream_vparam(st, width, height, duration);
return 0;
Expand Down
3 changes: 0 additions & 3 deletions src/service.h
Expand Up @@ -103,9 +103,6 @@ typedef struct elementary_stream {
/* CA ID's on this stream */
struct caid_list es_caids;

int es_vbv_size; /* Video buffer size (in bytes) */
int es_vbv_delay; /* -1 if CBR */

/* */

int es_delete_me; /* Temporary flag for deleting streams */
Expand Down

0 comments on commit f803f9d

Please sign in to comment.