[NUT-devel] [nut]: r209 - in trunk/libnut: demuxer.c libnut.h
ods15
subversion at mplayerhq.hu
Wed Nov 15 12:21:59 CET 2006
Author: ods15
Date: Wed Nov 15 12:21:59 2006
New Revision: 209
Modified:
trunk/libnut/demuxer.c
trunk/libnut/libnut.h
Log:
API change. no more packet type, and stream list allocation and freeing is handeled by demuxer
Modified: trunk/libnut/demuxer.c
==============================================================================
--- trunk/libnut/demuxer.c (original)
+++ trunk/libnut/demuxer.c Wed Nov 15 12:21:59 2006
@@ -673,7 +673,6 @@
}
start = bctello(nut->i) - 1;
- pd->type = e_frame;
flags = nut->ft[tmp].flags;
ERROR(flags & FLAG_INVALID, -ERR_NOT_FRAME_NOT_N);
@@ -923,6 +922,7 @@
SAFE_CALLOC(nut->alloc, *s, sizeof(nut_stream_header_t), nut->stream_count + 1);
for (i = 0; i < nut->stream_count; i++) (*s)[i] = nut->sc[i].sh;
(*s)[i].type = -1;
+ nut->tmp_buffer = (void*)s;
if (info) *info = nut->info;
err_out:
if (err != 2) flush_buf(nut->i); // unless EAGAIN
@@ -1370,6 +1370,7 @@
nut->sc = NULL;
nut->tb = NULL;
nut->info = NULL;
+ nut->tmp_buffer = NULL; // the caller's allocated stream list
nut->last_headers = 0;
nut->stream_count = 0;
nut->info_count = 0;
@@ -1424,6 +1425,7 @@
nut->alloc->free(nut->syncpoints.pts);
nut->alloc->free(nut->syncpoints.eor);
nut->alloc->free(nut->sc);
+ nut->alloc->free(nut->tmp_buffer); // the caller's allocated stream list
nut->alloc->free(nut->info);
nut->alloc->free(nut->tb);
nut->alloc->free(nut->seek_state);
Modified: trunk/libnut/libnut.h
==============================================================================
--- trunk/libnut/libnut.h (original)
+++ trunk/libnut/libnut.h Wed Nov 15 12:21:59 2006
@@ -107,18 +107,14 @@
} nut_info_packet_t;
typedef struct {
- enum { e_headers, e_unknown, e_frame, e_info } type; // unused for muxer
- // always used
int len;
- // only used if type is e_frame
int stream;
uint64_t pts;
int flags; // 1 - keyframe, 2 - EOR
- // not manditory, for reorderer
+ // not manditory, for reorderer muxer
int64_t next_pts;
} nut_packet_t;
-struct nut_context_s;
typedef struct nut_context_s nut_context_t;
// Muxer
More information about the NUT-devel
mailing list