Commit 65721116 authored by Jan Gerber's avatar Jan Gerber
Browse files

add missing imports and avoid some complier warnings

parent 82d2d6a6
......@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <getopt.h>
#include <math.h>
#include <errno.h>
......@@ -107,7 +108,7 @@ char *replace_str_all(char *str, char *orig, char *rep) {
char *p, *p_str = str, *p_buffer = (char *)buffer;
int len = strlen(str);
strncpy(p_buffer, str, len);
while (p = strstr(p_str, orig)) {
while ((p = strstr(p_str, orig))) {
strncpy(p_buffer, p_str, p-p_str);
p_buffer += (p-p_str);
len = len - strlen(orig) + strlen(rep);
......
......@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <getopt.h>
#include <math.h>
#include <errno.h>
......@@ -899,8 +900,8 @@ void ff2theora_output(ff2theora this) {
/*Force the offsets to be even so that chroma samples line up like we
expect.*/
this->frame_x_offset = this->frame_width-this->picture_width>>1&~1;
this->frame_y_offset = this->frame_height-this->picture_height>>1&~1;
this->frame_x_offset = (this->frame_width-this->picture_width)>>1&~1;
this->frame_y_offset = (this->frame_height-this->picture_height)>>1&~1;
//Bicubic (best for upscaling),
if (sws_flags < 0) {
......@@ -1694,7 +1695,7 @@ void ff2theora_output(ff2theora this) {
}
}
else if (enc->codec_id == CODEC_ID_TEXT) {
utf8 = pkt.data;
utf8 = (const char *)pkt.data;
utf8len = pkt.size;
}
else if (enc->codec_id == CODEC_ID_SSA) {
......@@ -1702,7 +1703,7 @@ void ff2theora_output(ff2theora this) {
extra_info_from_ssa(&pkt,&utf8,&utf8len,&allocated_utf8,&duration);
}
else if (enc->codec_id == CODEC_ID_MOV_TEXT) {
utf8 = pkt.data;
utf8 = (const char *)pkt.data;
utf8len = pkt.size;
if (utf8len >= 2) {
const unsigned char *data = (const unsigned char*)pkt.data;
......
#include <stddef.h>
#include <strings.h>
#include "iso639.h"
static const struct {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment