mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-29 16:31:12 +02:00
libeplayer3: let writers use AVPacket
This commit is contained in:
@@ -103,7 +103,7 @@ static int writeData(WriterAVCallData_t *call)
|
||||
|
||||
h263_printf(10, "VideoPts %lld\n", call->Pts);
|
||||
|
||||
if ((call->data == NULL) || (call->len <= 0)) {
|
||||
if ((call->packet->data == NULL) || (call->packet->size <= 0)) {
|
||||
h263_err("NULL Data. ignoring...\n");
|
||||
return 0;
|
||||
}
|
||||
@@ -114,11 +114,11 @@ static int writeData(WriterAVCallData_t *call)
|
||||
}
|
||||
|
||||
int HeaderLength =
|
||||
InsertPesHeader(PesHeader, call->len, H263_VIDEO_PES_START_CODE,
|
||||
InsertPesHeader(PesHeader, call->packet->size, H263_VIDEO_PES_START_CODE,
|
||||
call->Pts, 0);
|
||||
|
||||
int PrivateHeaderLength =
|
||||
InsertVideoPrivateDataHeader(&PesHeader[HeaderLength], call->len);
|
||||
InsertVideoPrivateDataHeader(&PesHeader[HeaderLength], call->packet->size);
|
||||
|
||||
int PesLength =
|
||||
PesHeader[PES_LENGTH_BYTE_0] +
|
||||
@@ -134,8 +134,8 @@ static int writeData(WriterAVCallData_t *call)
|
||||
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;
|
||||
iov[1].iov_base = call->packet->data;
|
||||
iov[1].iov_len = call->packet->size;
|
||||
len = writev(call->fd, iov, 2);
|
||||
|
||||
h263_printf(10, "< len %d\n", len);
|
||||
|
Reference in New Issue
Block a user