Commit 4ab754d9 authored by Jan Gerber's avatar Jan Gerber
Browse files

remove unused variables

parent a3eb8a78
......@@ -130,7 +130,6 @@ static void do_indent(FILE *output, int indent) {
void json_add_key_value(FILE *output, char *key, void *value, int type, int last, int indent) {
char *p;
int i;
do_indent(output, indent);
switch(type) {
......@@ -298,13 +297,9 @@ void json_codec_info(FILE *output, AVCodecContext *enc, int indent) {
static void json_stream_format(FILE *output, AVFormatContext *ic, int i, int indent, int first, int type_filter) {
static int _first = 1;
char buf[1024];
char buf1[32];
int flags = ic->iformat->flags;
AVStream *st = ic->streams[i];
int g = av_gcd(st->time_base.num, st->time_base.den);
AVMetadataTag *lang = av_metadata_get(st->metadata, "language", NULL, 0);
if (first)
_first = 1;
......@@ -347,7 +342,7 @@ static void json_stream_format(FILE *output, AVFormatContext *ic, int i, int ind
}
}
static int utf8_validate (uint8_t *s, int n) {
static int utf8_validate (char *s, int n) {
int i;
int extra_bytes;
int mask;
......@@ -391,8 +386,6 @@ void json_metadata(FILE *output, const AVFormatContext *av)
int first = 1, indent=2;
AVMetadataTag *tag = NULL;
while ((tag = av_metadata_get(av->metadata, "", tag, AV_METADATA_IGNORE_SUFFIX))) {
char uc_key[16];
int i;
if (strlen(tag->value) && utf8_validate (tag->value, strlen(tag->value))) {
if (first) {
first = 0;
......
......@@ -307,7 +307,6 @@ static void lut_apply(unsigned char *lut, unsigned char *src, unsigned char *dst
}
static void prepare_ycbcr_buffer(ff2theora this, th_ycbcr_buffer ycbcr, AVFrame *frame) {
int i;
/* pysical pages */
ycbcr[0].width = this->frame_width;
ycbcr[0].height = this->frame_height;
......@@ -429,7 +428,6 @@ static char *get_raw_text_from_ssa(const char *ssa)
static const float get_ssa_time(const char *p)
{
int hour, min, sec, hsec;
int r;
if(sscanf(p, "%d:%d:%d%*c%d", &hour, &min, &sec, &hsec) != 4)
return 0;
......@@ -441,7 +439,6 @@ static const float get_ssa_time(const char *p)
static const float get_duration_from_ssa(const char *ssa)
{
int n;
float d = 2.0f;
double start, end;
const char *ptr=ssa;
......@@ -1013,7 +1010,6 @@ void ff2theora_output(ff2theora this) {
int no_samples;
double framerate_add = 0;
double framerate_tmpcount = 0;
if (this->video_index >= 0)
info.audio_only=0;
......@@ -1301,7 +1297,7 @@ void ff2theora_output(ff2theora this) {
if ((video_eos && !video_done) || (ret >= 0 && pkt.stream_index == this->video_index)) {
if (avpkt.size == 0 && !first && !video_eos) {
fprintf (stderr, "no frame available\n");
//fprintf (stderr, "no frame available\n");
}
while(video_eos || avpkt.size > 0) {
int dups = 0;
......@@ -2522,11 +2518,12 @@ int main(int argc, char **argv) {
if (convert->video_quality == -1)
convert->video_quality = 0;
} else {
if (convert->video_quality == -1)
if (convert->video_quality == -1) {
if (convert->video_bitrate > 0)
convert->video_quality = 0;
else
convert->video_quality = rint(6*6.3); // default quality 5
}
}
if (convert->buf_delay>0 && convert->video_bitrate == 0) {
fprintf(stderr, "Buffer delay can only be used with target bitrate (-V).\n");
......
......@@ -47,6 +47,7 @@
#include <sys/stat.h>
#include <assert.h>
#include <math.h>
#include <limits.h>
#include "theora/theoraenc.h"
#include "vorbis/codec.h"
......@@ -971,7 +972,7 @@ void oggmux_init (oggmux_info *info) {
*/
void oggmux_add_video (oggmux_info *info, th_ycbcr_buffer ycbcr, int e_o_s) {
ogg_packet op;
int r, ret;
int ret;
if(info->passno==2){
for(;;){
......@@ -1213,7 +1214,6 @@ static double get_remaining(oggmux_info *info, double timebase) {
static double estimated_size(oggmux_info *info, double timebase) {
double projected_size = 0;
double to_encode, time_so_far;
if (info->duration != -1 && timebase > 0) {
projected_size = ((info->audio_bytesout + info->video_bytesout) / timebase) * info->duration / 1024 / 1024;
......
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