summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Holst <holstsn@users.sourceforge.net>2003-01-10 23:33:09 +0000
committerStefan Holst <holstsn@users.sourceforge.net>2003-01-10 23:33:09 +0000
commit787e61068296b541910700afee575340fbb147a2 (patch)
tree29d1c4db57601c7836ea8af7e86fdb423dee1270
parentedf46e3fb8e566cb64862fdadcf8a4956557741e (diff)
downloadxine-lib-787e61068296b541910700afee575340fbb147a2.tar.gz
xine-lib-787e61068296b541910700afee575340fbb147a2.tar.bz2
support for BUF_FLAG_FRAME_START
CVS patchset: 3858 CVS date: 2003/01/10 23:33:09
-rw-r--r--src/libffmpeg/xine_decoder.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index 66e9c70b1..8be7844c2 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.86 2003/01/08 13:19:05 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.87 2003/01/10 23:33:09 holstsn Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -418,15 +418,18 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->bufsize);
this->buf = realloc( this->buf, this->bufsize );
}
-
- xine_fast_memcpy (&this->buf[this->size], buf->content, buf->size);
+
+ if(!(buf->decoder_flags & BUF_FLAG_FRAME_START)) {
+ xine_fast_memcpy (&this->buf[this->size], buf->content, buf->size);
- this->size += buf->size;
+ this->size += buf->size;
+ }
if (buf->decoder_flags & BUF_FLAG_FRAMERATE)
this->video_step = buf->decoder_info[0];
- if ( (buf->decoder_flags & BUF_FLAG_FRAME_END) || this->is_continous) {
+ if ( (buf->decoder_flags & (BUF_FLAG_FRAME_END|BUF_FLAG_FRAME_START))
+ || this->is_continous) {
vo_frame_t *img;
int got_picture, len, y;
@@ -606,6 +609,13 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
}
}
+
+ if(buf->decoder_flags & BUF_FLAG_FRAME_START) {
+ xine_fast_memcpy (&this->buf[this->size], buf->content, buf->size);
+
+ this->size += buf->size;
+ }
+
} else {
#ifdef LOG
printf ("ffmpeg: data but decoder not initialized (headers missing)\n");