mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Disable SCR interpollation, it seems wrog add timestamps to private streams
Original commit message from CVS: Disable SCR interpollation, it seems wrog add timestamps to private streams
This commit is contained in:
parent
1f2e909d49
commit
ccc2d53203
3 changed files with 14 additions and 6 deletions
|
@ -201,7 +201,7 @@ gst_mpeg_demux_init (GstMPEGDemux *mpeg_demux)
|
|||
/* i think everything is already zero'd, but oh well*/
|
||||
for (i=0;i<NUM_PRIVATE_1_PADS;i++) {
|
||||
mpeg_demux->private_1_pad[i] = NULL;
|
||||
mpeg_demux->private_1_offset[i] = 0;
|
||||
mpeg_demux->private_1_PTS[i] = 0;
|
||||
}
|
||||
for (i=0;i<NUM_SUBTITLE_PADS;i++) {
|
||||
mpeg_demux->subtitle_pad[i] = NULL;
|
||||
|
@ -582,14 +582,12 @@ done:
|
|||
/* if we don't know what it is, bail */
|
||||
if (outpad == NULL) {
|
||||
GST_DEBUG (0,"mpeg_demux::parse_packet: unknown packet id 0x%02X !!", id);
|
||||
/* return total number of bytes */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* FIXME, this should be done in parse_syshead */
|
||||
if ((*outpad) == NULL) {
|
||||
GST_DEBUG (0,"mpeg_demux::parse_packet: unexpected packet id 0x%02X!!", id);
|
||||
/* return total number of bytes */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -712,6 +710,10 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
|||
/* scrap first 4 bytes (so-called "mystery AC3 tag") */
|
||||
headerlen += 4;
|
||||
datalen -= 4;
|
||||
if (pts == -1)
|
||||
pts = mpeg_demux->private_1_PTS[ps_id_code - 0x80];
|
||||
else
|
||||
mpeg_demux->private_1_PTS[ps_id_code - 0x80] = pts;
|
||||
}
|
||||
else if ((ps_id_code >= 0x20) && (ps_id_code <= 0x2f)) {
|
||||
GST_DEBUG (0,"mpeg_demux: we have a subtitle_stream packet, track %d",
|
||||
|
@ -808,7 +810,6 @@ gst_mpeg_demux_parse_pes (GstMPEGParse *mpeg_parse, GstBuffer *buffer)
|
|||
gst_pad_push((*outpad),outbuf);
|
||||
}
|
||||
|
||||
/* return total number of bytes */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,13 @@ struct _MPEG1Stream {
|
|||
gint16 STD_buffer_size_bound;
|
||||
};
|
||||
|
||||
typedef struct _GstMPEG1StreamContext GstMPEG1StreamContext;
|
||||
|
||||
struct _GstMPEGStreamContext {
|
||||
GstPad *pad;
|
||||
guint64 pts;
|
||||
};
|
||||
|
||||
struct _GstMPEGDemux {
|
||||
GstMPEGParse parent;
|
||||
|
||||
|
@ -92,7 +99,7 @@ struct _GstMPEGDemux {
|
|||
|
||||
/* stream output pads */
|
||||
GstPad *private_1_pad[NUM_PRIVATE_1_PADS]; /* up to 8 ac3 audio tracks */
|
||||
gulong private_1_offset[NUM_PRIVATE_1_PADS];
|
||||
gulong private_1_PTS[NUM_PRIVATE_1_PADS];
|
||||
|
||||
GstPad *subtitle_pad[NUM_SUBTITLE_PADS];
|
||||
gulong subtitle_offset[NUM_SUBTITLE_PADS];
|
||||
|
|
|
@ -416,7 +416,7 @@ gst_mpeg_parse_loop (GstElement *element)
|
|||
size = GST_BUFFER_SIZE (data);
|
||||
|
||||
/* we are interpolating the scr here */
|
||||
mpeg_parse->current_scr += ((size * 90000LL) / (mpeg_parse->bit_rate));
|
||||
/* mpeg_parse->current_scr += ((size * 90000LL) / (mpeg_parse->bit_rate)); */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue