summaryrefslogtreecommitdiff
path: root/xine
diff options
context:
space:
mode:
Diffstat (limited to 'xine')
-rw-r--r--xine/ts2es.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/xine/ts2es.c b/xine/ts2es.c
index adae90d2..8f953018 100644
--- a/xine/ts2es.c
+++ b/xine/ts2es.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: ts2es.c,v 1.9 2010-03-20 22:20:18 phintuka Exp $
+ * $Id: ts2es.c,v 1.10 2010-03-20 23:28:33 phintuka Exp $
*
*/
@@ -167,6 +167,16 @@ buf_element_t *ts2es_put(ts2es_t *this, uint8_t *data, fifo_buffer_t *src_fifo)
}
}
+ /* split large packets */
+ if (this->buf) {
+ if ((this->video && this->buf->size >= 2048) ||
+ this->buf->size >= this->buf->max_size-2*TS_SIZE) {
+
+ result = this->buf;
+ this->buf = NULL;
+ }
+ }
+
/* need new buffer ? */
if (!this->buf) {
/* discard data until first payload start indicator */
@@ -199,14 +209,6 @@ buf_element_t *ts2es_put(ts2es_t *this, uint8_t *data, fifo_buffer_t *src_fifo)
ts2es_parse_pes(this);
}
- /* split large packets */
- if ((this->video && this->buf->size >= 2048+64-TS_SIZE) ||
- this->buf->size >= this->buf->max_size-TS_SIZE) {
-
- result = this->buf;
- this->buf = NULL;
- }
-
return result;
}