mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 07:22:44 +02:00
eplayer3 h263 fix
Origin commit data
------------------
Branch: master
Commit: 1ccc2ee75a
Author: martii <you@example.com>
Date: 2012-08-31 (Fri, 31 Aug 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -37,6 +37,9 @@
|
|||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#ifdef MARTII
|
||||||
|
#include <sys/uio.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "output.h"
|
#include "output.h"
|
||||||
@@ -92,7 +95,9 @@ static int writeData(void* _call)
|
|||||||
WriterAVCallData_t* call = (WriterAVCallData_t*) _call;
|
WriterAVCallData_t* call = (WriterAVCallData_t*) _call;
|
||||||
|
|
||||||
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
unsigned char PesHeader[PES_MAX_HEADER_SIZE];
|
||||||
|
#ifndef MARTII
|
||||||
unsigned char DataCopy[PES_MAX_HEADER_SIZE];
|
unsigned char DataCopy[PES_MAX_HEADER_SIZE];
|
||||||
|
#endif
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
h263_printf(10, "\n");
|
h263_printf(10, "\n");
|
||||||
@@ -130,6 +135,14 @@ static int writeData(void* _call)
|
|||||||
|
|
||||||
HeaderLength += PrivateHeaderLength;
|
HeaderLength += PrivateHeaderLength;
|
||||||
|
|
||||||
|
#ifdef MARTII
|
||||||
|
struct iovec iov[2];
|
||||||
|
iov[0].iov_base = PesHeader;
|
||||||
|
iov[0].iov_len = HeaderLength;
|
||||||
|
iov[1].iov_base = call->data;
|
||||||
|
iov[1].iov_len = call->len;
|
||||||
|
len = writev(call->fd, iov, 2);
|
||||||
|
#else
|
||||||
unsigned char *PacketData = call->data - HeaderLength;
|
unsigned char *PacketData = call->data - HeaderLength;
|
||||||
|
|
||||||
memcpy(DataCopy, PacketData, HeaderLength);
|
memcpy(DataCopy, PacketData, HeaderLength);
|
||||||
@@ -138,6 +151,7 @@ static int writeData(void* _call)
|
|||||||
len = write(call->fd, PacketData, call->len + HeaderLength);
|
len = write(call->fd, PacketData, call->len + HeaderLength);
|
||||||
|
|
||||||
memcpy(PacketData, DataCopy, HeaderLength);
|
memcpy(PacketData, DataCopy, HeaderLength);
|
||||||
|
#endif
|
||||||
|
|
||||||
h263_printf(10, "< len %d\n", len);
|
h263_printf(10, "< len %d\n", len);
|
||||||
return len;
|
return len;
|
||||||
|
Reference in New Issue
Block a user