Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 181459
b: refs/heads/master
c: 7b1dde0
h: refs/heads/master
i:
  181457: 145775b
  181455: 0aed9d4
v: v3
  • Loading branch information
Andy Walls authored and Mauro Carvalho Chehab committed Feb 26, 2010
1 parent 6f5e1a3 commit 48d69b5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 540bab93b769c757e92f1bd5e980a2ef647d4e86
refs/heads/master: 7b1dde03314912cfa9a5fa34ea9423df0db13860
3 changes: 3 additions & 0 deletions trunk/drivers/media/video/cx18/cx18-queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,9 @@ void cx18_stream_free(struct cx18_stream *s)
{
struct cx18_mdl *mdl;
struct cx18_buffer *buf;
struct cx18 *cx = s->cx;

CX18_DEBUG_INFO("Deallocating buffers for %s stream\n", s->name);

/* move all buffers to buf_pool and all MDLs to q_idle */
cx18_unload_queues(s);
Expand Down
22 changes: 19 additions & 3 deletions trunk/drivers/media/video/cx18/cx18-streams.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,27 @@ void cx18_streams_cleanup(struct cx18 *cx, int unregister)

/* Teardown all streams */
for (type = 0; type < CX18_MAX_STREAMS; type++) {
if (cx->streams[type].dvb.enabled) {
cx18_dvb_unregister(&cx->streams[type]);
cx->streams[type].dvb.enabled = false;

/* No struct video_device, but can have buffers allocated */
if (type == CX18_ENC_STREAM_TYPE_TS) {
if (cx->streams[type].dvb.enabled) {
cx18_dvb_unregister(&cx->streams[type]);
cx->streams[type].dvb.enabled = false;
cx18_stream_free(&cx->streams[type]);
}
continue;
}

/* No struct video_device, but can have buffers allocated */
if (type == CX18_ENC_STREAM_TYPE_IDX) {
if (cx->stream_buffers[type] != 0) {
cx->stream_buffers[type] = 0;
cx18_stream_free(&cx->streams[type]);
}
continue;
}

/* If struct video_device exists, can have buffers allocated */
vdev = cx->streams[type].video_dev;

cx->streams[type].video_dev = NULL;
Expand Down

0 comments on commit 48d69b5

Please sign in to comment.