diff options
-rw-r--r-- | libhb/decavcodec.c | 18 | ||||
-rw-r--r-- | libhb/declpcm.c | 3 | ||||
-rw-r--r-- | libhb/decpgssub.c | 2 | ||||
-rw-r--r-- | libhb/decssasub.c | 7 | ||||
-rw-r--r-- | libhb/decvobsub.c | 3 | ||||
-rw-r--r-- | libhb/internal.h | 13 | ||||
-rw-r--r-- | libhb/reader.c | 3 |
7 files changed, 11 insertions, 38 deletions
diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index e245069af..91552ba8f 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -1110,7 +1110,7 @@ static int get_frame_type(int type) /* * Decodes a video frame from the specified raw packet data - * ('data', 'size', 'sequence'). + * ('data', 'size'). * The output of this function is stored in 'pv->list', which contains a list * of zero or more decoded packets. * @@ -1122,7 +1122,7 @@ static int get_frame_type(int type) * until enough packets have been decoded so that the timestamps can be * correctly rewritten, if this is necessary. */ -static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequence, int64_t pts, int64_t dts, uint8_t frametype ) +static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int64_t pts, int64_t dts, uint8_t frametype ) { hb_work_private_t *pv = w->private_data; int got_picture, oldlevel = 0; @@ -1332,7 +1332,6 @@ static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequen buf = copy_frame( pv ); av_frame_unref(pv->frame); buf->s.start = pts; - buf->sequence = sequence; buf->s.flags = flags; buf->s.frametype = frametype; @@ -1391,7 +1390,6 @@ static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequen // add the new frame to the delayq & push its timestamp on the heap buf = copy_frame( pv ); av_frame_unref(pv->frame); - buf->sequence = sequence; /* Store picture flags for later use by filters */ buf->s.flags = flags; buf->s.frametype = frametype; @@ -1403,7 +1401,7 @@ static int decodeFrame( hb_work_object_t *w, uint8_t *data, int size, int sequen return got_picture; } -static void decodeVideo( hb_work_object_t *w, uint8_t *data, int size, int sequence, int64_t pts, int64_t dts, uint8_t frametype ) +static void decodeVideo( hb_work_object_t *w, uint8_t *data, int size, int64_t pts, int64_t dts, uint8_t frametype ) { hb_work_private_t *pv = w->private_data; @@ -1436,14 +1434,14 @@ static void decodeVideo( hb_work_object_t *w, uint8_t *data, int size, int seque if ( pout_len > 0 ) { - decodeFrame( w, pout, pout_len, sequence, parser_pts, parser_dts, frametype ); + decodeFrame( w, pout, pout_len, parser_pts, parser_dts, frametype ); } } while ( pos < size ); /* the stuff above flushed the parser, now flush the decoder */ if (size <= 0) { - while (decodeFrame(w, NULL, 0, sequence, AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0)) + while (decodeFrame(w, NULL, 0, AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0)) { continue; } @@ -1451,7 +1449,7 @@ static void decodeVideo( hb_work_object_t *w, uint8_t *data, int size, int seque if (pv->qsv.decode) { // flush a second time - while (decodeFrame(w, NULL, 0, sequence, AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0)) + while (decodeFrame(w, NULL, 0, AV_NOPTS_VALUE, AV_NOPTS_VALUE, 0)) { continue; } @@ -1672,7 +1670,7 @@ static int decavcodecvWork( hb_work_object_t * w, hb_buffer_t ** buf_in, { if (pv->context != NULL && pv->context->codec != NULL) { - decodeVideo(w, in->data, 0, 0, pts, dts, 0); + decodeVideo(w, in->data, 0, pts, dts, 0); } hb_buffer_list_append(&pv->list, in); *buf_out = hb_buffer_list_clear(&pv->list); @@ -1762,7 +1760,7 @@ static int decavcodecvWork( hb_work_object_t * w, hb_buffer_t ** buf_in, pv->palette = in->palette; in->palette = NULL; } - decodeVideo( w, in->data, in->size, in->sequence, pts, dts, in->s.frametype ); + decodeVideo( w, in->data, in->size, pts, dts, in->s.frametype ); hb_buffer_close( &in ); *buf_out = hb_buffer_list_clear(&pv->list); return HB_WORK_OK; diff --git a/libhb/declpcm.c b/libhb/declpcm.c index ff3e55fc2..a75c506d9 100644 --- a/libhb/declpcm.c +++ b/libhb/declpcm.c @@ -20,7 +20,6 @@ struct hb_work_private_s uint32_t pos; /* buffer offset for next input data */ int64_t next_pts; /* pts for next output frame */ - int64_t sequence; /* the following is frame info for the frame we're currently accumulating */ uint64_t duration; /* frame duratin (in 90KHz ticks) */ @@ -199,8 +198,6 @@ static int declpcmWork( hb_work_object_t * w, hb_buffer_t ** buf_in, return HB_WORK_DONE; } - pv->sequence = in->sequence; - // if we have a frame to finish, add enough data from this buf // to finish it if (pv->size) diff --git a/libhb/decpgssub.c b/libhb/decpgssub.c index 2a00617ce..9a8445a93 100644 --- a/libhb/decpgssub.c +++ b/libhb/decpgssub.c @@ -370,7 +370,6 @@ static int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, hb_buffer_list_close(&pv->list_pass); out->s = in->s; - out->sequence = in->sequence; } out->s.frametype = HB_FRAME_SUBTITLE; out->s.renderOffset = AV_NOPTS_VALUE; @@ -408,7 +407,6 @@ static int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, out->s.frametype = HB_FRAME_SUBTITLE; out->s.id = in->s.id; - out->sequence = in->sequence; out->s.start = pts; out->s.stop = AV_NOPTS_VALUE; out->s.renderOffset = AV_NOPTS_VALUE; diff --git a/libhb/decssasub.c b/libhb/decssasub.c index 4581771d6..7027926e8 100644 --- a/libhb/decssasub.c +++ b/libhb/decssasub.c @@ -226,7 +226,7 @@ void hb_ssa_style_init(hb_subtitle_style_t *style) style->bg_alpha = 0xFF; } -static hb_buffer_t *ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, uint8_t *in_data, int in_size, int in_sequence ); +static hb_buffer_t *ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, uint8_t *in_data, int in_size ); /* * Decodes a single SSA packet to one or more TEXTSUB or PICTURESUB subtitle packets. @@ -257,7 +257,7 @@ static hb_buffer_t *ssa_decode_packet( hb_work_object_t * w, hb_buffer_t *in ) // Decode an individual SSA line buf = ssa_decode_line_to_mkv_ssa(w, (uint8_t *)curLine, - strlen(curLine), in->sequence); + strlen(curLine)); hb_buffer_list_append(&list, buf); } @@ -346,7 +346,7 @@ static uint8_t *find_field( uint8_t *pos, uint8_t *end, int fieldNum ) * ReadOrder,Marked, Style,Name,MarginL,MarginR,MarginV,Effect,Text '\0' * 1 2 3 4 5 6 7 8 9 */ -static hb_buffer_t *ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, uint8_t *in_data, int in_size, int in_sequence ) +static hb_buffer_t *ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, uint8_t *in_data, int in_size ) { hb_work_private_t * pv = w->private_data; hb_buffer_t * out; @@ -397,7 +397,6 @@ static hb_buffer_t *ssa_decode_line_to_mkv_ssa( hb_work_object_t * w, uint8_t *i out->s.frametype = HB_FRAME_SUBTITLE; out->s.start = in_start; out->s.stop = in_stop; - out->sequence = in_sequence; if( out->size == 0 ) { diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c index 6fc60c511..85644c47d 100644 --- a/libhb/decvobsub.c +++ b/libhb/decvobsub.c @@ -124,7 +124,6 @@ int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, memcpy( pv->buf->data, in->data, in->size ); pv->buf->s.id = in->s.id; pv->buf->s.frametype = HB_FRAME_SUBTITLE; - pv->buf->sequence = in->sequence; pv->size_got = in->size; if( in->s.start >= 0 ) { @@ -139,7 +138,6 @@ int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, { memcpy( pv->buf->data + pv->size_got, in->data, in->size ); pv->buf->s.id = in->s.id; - pv->buf->sequence = in->sequence; pv->size_got += in->size; if( in->s.start >= 0 ) { @@ -169,7 +167,6 @@ int decsubWork( hb_work_object_t * w, hb_buffer_t ** buf_in, if( buf_out && *buf_out ) { (*buf_out)->s.id = in->s.id; - (*buf_out)->sequence = in->sequence; } /* Wait for the next one */ diff --git a/libhb/internal.h b/libhb/internal.h index 82012a7d7..b082a7097 100644 --- a/libhb/internal.h +++ b/libhb/internal.h @@ -119,19 +119,6 @@ struct hb_buffer_s uint8_t * data; // packet data int offset; // used internally by packet lists (hb_list_t) - /* - * Corresponds to the order that this packet was read from the demuxer. - * - * It is important that video decoder work-objects pass this value through - * from their input packets to the output packets they generate. Otherwise - * RENDERSUB subtitles (especially VOB subtitles) will break. - * - * Subtitle decoder work-objects that output a renderable subtitle - * format (ex: PICTURESUB) must also be careful to pass the sequence number - * through for the same reason. - */ - int64_t sequence; - hb_buffer_settings_t s; hb_image_format_t f; diff --git a/libhb/reader.c b/libhb/reader.c index eed99da6e..84de0856a 100644 --- a/libhb/reader.c +++ b/libhb/reader.c @@ -58,7 +58,6 @@ struct hb_work_private_s int sub_scr_set; hb_psdemux_t demux; int scr_changes; - uint32_t sequence; uint8_t st_slots; // size (in slots) of stream_timing array uint8_t saw_video; // != 0 if we've seen video uint8_t saw_audio; // != 0 if we've seen audio @@ -210,7 +209,6 @@ static int reader_init( hb_work_object_t * w, hb_job_t * job ) r->job = job; r->title = job->title; r->die = job->die; - r->sequence = 0; r->st_slots = 4; r->stream_timing = calloc( sizeof(stream_timing_t), r->st_slots ); @@ -810,7 +808,6 @@ static int reader_work( hb_work_object_t * w, hb_buffer_t ** buf_in, continue; } - buf->sequence = r->sequence++; /* if there are mutiple output fifos, send a copy of the * buffer down all but the first (we have to not ship the * original buffer or we'll race with the thread that's |