Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
transcode: log cleanups, some memory leaks fixed
  • Loading branch information
perexg committed Oct 15, 2014
1 parent 2637ee0 commit d1a014f
Show file tree
Hide file tree
Showing 5 changed files with 340 additions and 321 deletions.
5 changes: 5 additions & 0 deletions src/libav.c
Expand Up @@ -30,6 +30,11 @@ libav_log_callback(void *ptr, int level, const char *fmt, va_list vl)
else if(level == AV_LOG_PANIC)
level = LOG_EMERG;

if (level == LOG_INFO) {
if (!strncmp(message, "--prefix=/", 10))
return;
}

while(l < message + sizeof(message)) {
nl = strstr(l, "\n");
if(nl)
Expand Down
6 changes: 5 additions & 1 deletion src/packet.c
Expand Up @@ -22,6 +22,10 @@
#include "string.h"
#include "atomic.h"

#ifndef PKTBUF_DATA_ALIGN
#define PKTBUF_DATA_ALIGN 64
#endif

/*
*
*/
Expand Down Expand Up @@ -217,7 +221,7 @@ pktbuf_alloc(const void *data, size_t size)
pb->pb_size = size;

if(size > 0) {
pb->pb_data = malloc(size);
pb->pb_data = aligned_alloc(PKTBUF_DATA_ALIGN, size + 8);
if(data != NULL)
memcpy(pb->pb_data, data, size);
}
Expand Down

0 comments on commit d1a014f

Please sign in to comment.