Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f2310fff5c | ||
![]() |
125fe08492 | ||
![]() |
e45f0f0f66 | ||
![]() |
becde6ab1c | ||
![]() |
eeb8dabd29 | ||
![]() |
94576cec54 | ||
![]() |
2f00d28aa0 | ||
![]() |
dbe57f7e9f | ||
![]() |
4bee3eba75 | ||
![]() |
2440424f1d | ||
![]() |
31f337c1e4 | ||
![]() |
f84ddb0c0f | ||
![]() |
bbefdb3938 | ||
![]() |
cc0662daef | ||
![]() |
10d59d29bc | ||
![]() |
7fc39f51cd | ||
![]() |
f49b2a9d08 | ||
![]() |
98dfe0d8bd | ||
![]() |
08be125dde | ||
![]() |
e20a019c91 | ||
![]() |
16ac9edc2f |
2
Doxyfile
2
Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 1.0.5
|
PROJECT_NUMBER = 1.0.6
|
||||||
|
|
||||||
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
|
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
|
||||||
# in the documentation. The maximum height of the logo should not exceed 55
|
# in the documentation. The maximum height of the logo should not exceed 55
|
||||||
|
@@ -408,10 +408,11 @@ x86 Michael Niedermayer
|
|||||||
Releases
|
Releases
|
||||||
========
|
========
|
||||||
|
|
||||||
|
1.2 Michael Niedermayer
|
||||||
|
1.1 Michael Niedermayer
|
||||||
1.0 Michael Niedermayer
|
1.0 Michael Niedermayer
|
||||||
0.11 Michael Niedermayer
|
|
||||||
0.10 Michael Niedermayer
|
|
||||||
|
|
||||||
|
If you want to maintain an older release, please contact us
|
||||||
|
|
||||||
|
|
||||||
GnuPG Fingerprints of maintainers and contributors
|
GnuPG Fingerprints of maintainers and contributors
|
||||||
|
@@ -61,7 +61,7 @@ struct SwsContext *sws_opts;
|
|||||||
SwrContext *swr_opts;
|
SwrContext *swr_opts;
|
||||||
AVDictionary *format_opts, *codec_opts;
|
AVDictionary *format_opts, *codec_opts;
|
||||||
|
|
||||||
const int this_year = 2012;
|
const int this_year = 2013;
|
||||||
|
|
||||||
static FILE *report_file;
|
static FILE *report_file;
|
||||||
|
|
||||||
|
@@ -1013,7 +1013,7 @@ ffmpeg -filter_complex 'color=red' -t 5 out.mkv
|
|||||||
|
|
||||||
As a special exception, you can use a bitmap subtitle stream as input: it
|
As a special exception, you can use a bitmap subtitle stream as input: it
|
||||||
will be converted into a video with the same size as the largest video in
|
will be converted into a video with the same size as the largest video in
|
||||||
the file, or 720×576 if no video is present. Note that this is an
|
the file, or 720x576 if no video is present. Note that this is an
|
||||||
experimental and temporary solution. It will be removed once libavfilter has
|
experimental and temporary solution. It will be removed once libavfilter has
|
||||||
proper support for subtitles.
|
proper support for subtitles.
|
||||||
|
|
||||||
|
@@ -3458,7 +3458,7 @@ Tile several successive frames together.
|
|||||||
It accepts as argument the tile size (i.e. the number of lines and columns)
|
It accepts as argument the tile size (i.e. the number of lines and columns)
|
||||||
in the form "@var{w}x@var{h}".
|
in the form "@var{w}x@var{h}".
|
||||||
|
|
||||||
For example, produce 8×8 PNG tiles of all keyframes (@option{-skip_frame
|
For example, produce 8x8 PNG tiles of all keyframes (@option{-skip_frame
|
||||||
nokey}) in a movie:
|
nokey}) in a movie:
|
||||||
@example
|
@example
|
||||||
ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
|
ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
|
||||||
@@ -4554,7 +4554,7 @@ streams in each segment. Default is 0.
|
|||||||
The filter has @var{v}+@var{a} outputs: first @var{v} video outputs, then
|
The filter has @var{v}+@var{a} outputs: first @var{v} video outputs, then
|
||||||
@var{a} audio outputs.
|
@var{a} audio outputs.
|
||||||
|
|
||||||
There are @var{n}×(@var{v}+@var{a}) inputs: first the inputs for the first
|
There are @var{n}x(@var{v}+@var{a}) inputs: first the inputs for the first
|
||||||
segment, in the same order as the outputs, then the inputs for the second
|
segment, in the same order as the outputs, then the inputs for the second
|
||||||
segment, etc.
|
segment, etc.
|
||||||
|
|
||||||
|
@@ -1124,7 +1124,12 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
|
|||||||
for (k = 0; k < sbr->n[sbr->data[0].bs_freq_res[e]]; k++) {
|
for (k = 0; k < sbr->n[sbr->data[0].bs_freq_res[e]]; k++) {
|
||||||
float temp1 = exp2f(sbr->data[0].env_facs[e][k] * alpha + 7.0f);
|
float temp1 = exp2f(sbr->data[0].env_facs[e][k] * alpha + 7.0f);
|
||||||
float temp2 = exp2f((pan_offset - sbr->data[1].env_facs[e][k]) * alpha);
|
float temp2 = exp2f((pan_offset - sbr->data[1].env_facs[e][k]) * alpha);
|
||||||
float fac = temp1 / (1.0f + temp2);
|
float fac;
|
||||||
|
if (temp1 > 1E20) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
|
||||||
|
temp1 = 1;
|
||||||
|
}
|
||||||
|
fac = temp1 / (1.0f + temp2);
|
||||||
sbr->data[0].env_facs[e][k] = fac;
|
sbr->data[0].env_facs[e][k] = fac;
|
||||||
sbr->data[1].env_facs[e][k] = fac * temp2;
|
sbr->data[1].env_facs[e][k] = fac * temp2;
|
||||||
}
|
}
|
||||||
@@ -1133,7 +1138,12 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
|
|||||||
for (k = 0; k < sbr->n_q; k++) {
|
for (k = 0; k < sbr->n_q; k++) {
|
||||||
float temp1 = exp2f(NOISE_FLOOR_OFFSET - sbr->data[0].noise_facs[e][k] + 1);
|
float temp1 = exp2f(NOISE_FLOOR_OFFSET - sbr->data[0].noise_facs[e][k] + 1);
|
||||||
float temp2 = exp2f(12 - sbr->data[1].noise_facs[e][k]);
|
float temp2 = exp2f(12 - sbr->data[1].noise_facs[e][k]);
|
||||||
float fac = temp1 / (1.0f + temp2);
|
float fac;
|
||||||
|
if (temp1 > 1E20) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
|
||||||
|
temp1 = 1;
|
||||||
|
}
|
||||||
|
fac = temp1 / (1.0f + temp2);
|
||||||
sbr->data[0].noise_facs[e][k] = fac;
|
sbr->data[0].noise_facs[e][k] = fac;
|
||||||
sbr->data[1].noise_facs[e][k] = fac * temp2;
|
sbr->data[1].noise_facs[e][k] = fac * temp2;
|
||||||
}
|
}
|
||||||
@@ -1142,9 +1152,15 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
|
|||||||
for (ch = 0; ch < (id_aac == TYPE_CPE) + 1; ch++) {
|
for (ch = 0; ch < (id_aac == TYPE_CPE) + 1; ch++) {
|
||||||
float alpha = sbr->data[ch].bs_amp_res ? 1.0f : 0.5f;
|
float alpha = sbr->data[ch].bs_amp_res ? 1.0f : 0.5f;
|
||||||
for (e = 1; e <= sbr->data[ch].bs_num_env; e++)
|
for (e = 1; e <= sbr->data[ch].bs_num_env; e++)
|
||||||
for (k = 0; k < sbr->n[sbr->data[ch].bs_freq_res[e]]; k++)
|
for (k = 0; k < sbr->n[sbr->data[ch].bs_freq_res[e]]; k++){
|
||||||
sbr->data[ch].env_facs[e][k] =
|
sbr->data[ch].env_facs[e][k] =
|
||||||
exp2f(alpha * sbr->data[ch].env_facs[e][k] + 6.0f);
|
exp2f(alpha * sbr->data[ch].env_facs[e][k] + 6.0f);
|
||||||
|
if (sbr->data[ch].env_facs[e][k] > 1E20) {
|
||||||
|
av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
|
||||||
|
sbr->data[ch].env_facs[e][k] = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (e = 1; e <= sbr->data[ch].bs_num_noise; e++)
|
for (e = 1; e <= sbr->data[ch].bs_num_noise; e++)
|
||||||
for (k = 0; k < sbr->n_q; k++)
|
for (k = 0; k < sbr->n_q; k++)
|
||||||
sbr->data[ch].noise_facs[e][k] =
|
sbr->data[ch].noise_facs[e][k] =
|
||||||
|
@@ -201,6 +201,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
buf[803] = s->bits_per_component;
|
buf[803] = s->bits_per_component;
|
||||||
write16(buf + 804, (s->bits_per_component == 10 || s->bits_per_component == 12) ?
|
write16(buf + 804, (s->bits_per_component == 10 || s->bits_per_component == 12) ?
|
||||||
1 : 0); /* packing method */
|
1 : 0); /* packing method */
|
||||||
|
write32(buf + 808, HEADER_SIZE); /* data offset */
|
||||||
|
|
||||||
/* Image source information header */
|
/* Image source information header */
|
||||||
write32(buf + 1628, avctx->sample_aspect_ratio.num);
|
write32(buf + 1628, avctx->sample_aspect_ratio.num);
|
||||||
|
@@ -174,7 +174,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
|
|||||||
frame->pict_type == AV_PICTURE_TYPE_P ? X264_TYPE_P :
|
frame->pict_type == AV_PICTURE_TYPE_P ? X264_TYPE_P :
|
||||||
frame->pict_type == AV_PICTURE_TYPE_B ? X264_TYPE_B :
|
frame->pict_type == AV_PICTURE_TYPE_B ? X264_TYPE_B :
|
||||||
X264_TYPE_AUTO;
|
X264_TYPE_AUTO;
|
||||||
if (x4->params.b_tff != frame->top_field_first) {
|
if (x4->params.b_interlaced && x4->params.b_tff != frame->top_field_first) {
|
||||||
x4->params.b_tff = frame->top_field_first;
|
x4->params.b_tff = frame->top_field_first;
|
||||||
x264_encoder_reconfig(x4->enc, &x4->params);
|
x264_encoder_reconfig(x4->enc, &x4->params);
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,7 @@ typedef struct MpegAudioParseContext {
|
|||||||
int frame_size;
|
int frame_size;
|
||||||
uint32_t header;
|
uint32_t header;
|
||||||
int header_count;
|
int header_count;
|
||||||
|
int no_bitrate;
|
||||||
} MpegAudioParseContext;
|
} MpegAudioParseContext;
|
||||||
|
|
||||||
#define MPA_HEADER_SIZE 4
|
#define MPA_HEADER_SIZE 4
|
||||||
@@ -74,15 +75,18 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
|
|||||||
if((state&SAME_HEADER_MASK) != (s->header&SAME_HEADER_MASK) && s->header)
|
if((state&SAME_HEADER_MASK) != (s->header&SAME_HEADER_MASK) && s->header)
|
||||||
s->header_count= -3;
|
s->header_count= -3;
|
||||||
s->header= state;
|
s->header= state;
|
||||||
s->header_count++;
|
|
||||||
s->frame_size = ret-4;
|
s->frame_size = ret-4;
|
||||||
|
|
||||||
if (s->header_count > 1) {
|
if (s->header_count > 0) {
|
||||||
avctx->sample_rate= sr;
|
avctx->sample_rate= sr;
|
||||||
avctx->channels = channels;
|
avctx->channels = channels;
|
||||||
s1->duration = frame_size;
|
s1->duration = frame_size;
|
||||||
avctx->bit_rate = bit_rate;
|
if (s->no_bitrate || !avctx->bit_rate) {
|
||||||
|
s->no_bitrate = 1;
|
||||||
|
avctx->bit_rate += (bit_rate - avctx->bit_rate) / s->header_count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
s->header_count++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -138,7 +138,8 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
|||||||
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
|
unsigned int width= FFABS(pic->linesize[0]) / (depth >> 3);
|
||||||
|
|
||||||
output = pic->data[0] + (avctx->height - 1) * pic->linesize[0];
|
output = pic->data[0] + (avctx->height - 1) * pic->linesize[0];
|
||||||
output_end = pic->data[0] + avctx->height * pic->linesize[0];
|
output_end = output + FFABS(pic->linesize[0]);
|
||||||
|
|
||||||
while (bytestream2_get_bytes_left(gb) > 0) {
|
while (bytestream2_get_bytes_left(gb) > 0) {
|
||||||
p1 = bytestream2_get_byteu(gb);
|
p1 = bytestream2_get_byteu(gb);
|
||||||
if(p1 == 0) { //Escape code
|
if(p1 == 0) { //Escape code
|
||||||
@@ -155,6 +156,7 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
output_end = output + FFABS(pic->linesize[0]);
|
||||||
pos = 0;
|
pos = 0;
|
||||||
continue;
|
continue;
|
||||||
} else if(p2 == 1) { //End-of-picture
|
} else if(p2 == 1) { //End-of-picture
|
||||||
@@ -169,11 +171,11 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3);
|
output = pic->data[0] + line * pic->linesize[0] + pos * (depth >> 3);
|
||||||
|
output_end = pic->data[0] + line * pic->linesize[0] + FFABS(pic->linesize[0]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Copy data
|
// Copy data
|
||||||
if ((pic->linesize[0] > 0 && output + p2 * (depth >> 3) > output_end) ||
|
if (output + p2 * (depth >> 3) > output_end) {
|
||||||
(pic->linesize[0] < 0 && output + p2 * (depth >> 3) < output_end)) {
|
|
||||||
bytestream2_skip(gb, 2 * (depth >> 3));
|
bytestream2_skip(gb, 2 * (depth >> 3));
|
||||||
continue;
|
continue;
|
||||||
} else if (bytestream2_get_bytes_left(gb) < p2 * (depth >> 3)) {
|
} else if (bytestream2_get_bytes_left(gb) < p2 * (depth >> 3)) {
|
||||||
@@ -203,36 +205,39 @@ static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
|
|||||||
pos += p2;
|
pos += p2;
|
||||||
} else { //run of pixels
|
} else { //run of pixels
|
||||||
uint8_t pix[3]; //original pixel
|
uint8_t pix[3]; //original pixel
|
||||||
switch(depth){
|
if (output + p1 * (depth >> 3) > output_end)
|
||||||
case 8: pix[0] = bytestream2_get_byte(gb);
|
|
||||||
break;
|
|
||||||
case 16: pix16 = bytestream2_get_le16(gb);
|
|
||||||
break;
|
|
||||||
case 24: pix[0] = bytestream2_get_byte(gb);
|
|
||||||
pix[1] = bytestream2_get_byte(gb);
|
|
||||||
pix[2] = bytestream2_get_byte(gb);
|
|
||||||
break;
|
|
||||||
case 32: pix32 = bytestream2_get_le32(gb);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if ((pic->linesize[0] > 0 && output + p1 * (depth >> 3) > output_end) ||
|
|
||||||
(pic->linesize[0] < 0 && output + p1 * (depth >> 3) < output_end))
|
|
||||||
continue;
|
continue;
|
||||||
for(i = 0; i < p1; i++) {
|
|
||||||
switch(depth){
|
switch(depth){
|
||||||
case 8: *output++ = pix[0];
|
case 8:
|
||||||
break;
|
pix[0] = bytestream2_get_byte(gb);
|
||||||
case 16: *(uint16_t*)output = pix16;
|
for(i = 0; i < p1; i++)
|
||||||
output += 2;
|
*output++ = pix[0];
|
||||||
break;
|
break;
|
||||||
case 24: *output++ = pix[0];
|
case 16:
|
||||||
*output++ = pix[1];
|
pix16 = bytestream2_get_le16(gb);
|
||||||
*output++ = pix[2];
|
for(i = 0; i < p1; i++) {
|
||||||
break;
|
*(uint16_t*)output = pix16;
|
||||||
case 32: *(uint32_t*)output = pix32;
|
output += 2;
|
||||||
output += 4;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
pix[0] = bytestream2_get_byte(gb);
|
||||||
|
pix[1] = bytestream2_get_byte(gb);
|
||||||
|
pix[2] = bytestream2_get_byte(gb);
|
||||||
|
for(i = 0; i < p1; i++) {
|
||||||
|
*output++ = pix[0];
|
||||||
|
*output++ = pix[1];
|
||||||
|
*output++ = pix[2];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
pix32 = bytestream2_get_le32(gb);
|
||||||
|
for(i = 0; i < p1; i++) {
|
||||||
|
*(uint32_t*)output = pix32;
|
||||||
|
output += 4;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
pos += p1;
|
pos += p1;
|
||||||
}
|
}
|
||||||
|
@@ -106,7 +106,7 @@ av_cold struct FFPsyPreprocessContext* ff_psy_preprocess_init(AVCodecContext *av
|
|||||||
if (!cutoff_coeff && avctx->codec_id == AV_CODEC_ID_AAC)
|
if (!cutoff_coeff && avctx->codec_id == AV_CODEC_ID_AAC)
|
||||||
cutoff_coeff = 2.0 * AAC_CUTOFF(avctx) / avctx->sample_rate;
|
cutoff_coeff = 2.0 * AAC_CUTOFF(avctx) / avctx->sample_rate;
|
||||||
|
|
||||||
if (cutoff_coeff)
|
if (cutoff_coeff && cutoff_coeff < 0.98)
|
||||||
ctx->fcoeffs = ff_iir_filter_init_coeffs(avctx, FF_FILTER_TYPE_BUTTERWORTH,
|
ctx->fcoeffs = ff_iir_filter_init_coeffs(avctx, FF_FILTER_TYPE_BUTTERWORTH,
|
||||||
FF_FILTER_MODE_LOWPASS, FILT_ORDER,
|
FF_FILTER_MODE_LOWPASS, FILT_ORDER,
|
||||||
cutoff_coeff, 0.0, 0.0);
|
cutoff_coeff, 0.0, 0.0);
|
||||||
|
@@ -195,7 +195,7 @@ static void process_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
|
|||||||
av_log(ctx, AV_LOG_ERROR, "Frame after EOF on input %s\n",
|
av_log(ctx, AV_LOG_ERROR, "Frame after EOF on input %s\n",
|
||||||
ctx->input_pads[in_no].name);
|
ctx->input_pads[in_no].name);
|
||||||
avfilter_unref_buffer(buf);
|
avfilter_unref_buffer(buf);
|
||||||
} if (in_no >= cat->cur_idx + ctx->nb_outputs) {
|
} else if (in_no >= cat->cur_idx + ctx->nb_outputs) {
|
||||||
ff_bufqueue_add(ctx, &cat->in[in_no].queue, buf);
|
ff_bufqueue_add(ctx, &cat->in[in_no].queue, buf);
|
||||||
} else {
|
} else {
|
||||||
push_frame(ctx, in_no, buf);
|
push_frame(ctx, in_no, buf);
|
||||||
|
@@ -536,11 +536,13 @@ static int hls_read_header(AVFormatContext *s)
|
|||||||
/* Create new AVStreams for each stream in this variant */
|
/* Create new AVStreams for each stream in this variant */
|
||||||
for (j = 0; j < v->ctx->nb_streams; j++) {
|
for (j = 0; j < v->ctx->nb_streams; j++) {
|
||||||
AVStream *st = avformat_new_stream(s, NULL);
|
AVStream *st = avformat_new_stream(s, NULL);
|
||||||
|
AVStream *ist = v->ctx->streams[j];
|
||||||
if (!st) {
|
if (!st) {
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
st->id = i;
|
st->id = i;
|
||||||
|
avpriv_set_pts_info(st, ist->pts_wrap_bits, ist->time_base.num, ist->time_base.den);
|
||||||
avcodec_copy_context(st->codec, v->ctx->streams[j]->codec);
|
avcodec_copy_context(st->codec, v->ctx->streams[j]->codec);
|
||||||
if (v->bandwidth)
|
if (v->bandwidth)
|
||||||
av_dict_set(&st->metadata, "variant_bitrate", bitrate_str,
|
av_dict_set(&st->metadata, "variant_bitrate", bitrate_str,
|
||||||
|
@@ -201,6 +201,8 @@ static int iff_read_header(AVFormatContext *s)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_CMAP:
|
case ID_CMAP:
|
||||||
|
if (data_size > INT_MAX - IFF_EXTRA_VIDEO_SIZE - FF_INPUT_BUFFER_PADDING_SIZE)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
st->codec->extradata_size = data_size + IFF_EXTRA_VIDEO_SIZE;
|
st->codec->extradata_size = data_size + IFF_EXTRA_VIDEO_SIZE;
|
||||||
st->codec->extradata = av_malloc(data_size + IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
|
st->codec->extradata = av_malloc(data_size + IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if (!st->codec->extradata)
|
if (!st->codec->extradata)
|
||||||
@@ -323,6 +325,7 @@ static int iff_read_header(AVFormatContext *s)
|
|||||||
if (!st->codec->extradata)
|
if (!st->codec->extradata)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
|
av_assert0(st->codec->extradata_size >= IFF_EXTRA_VIDEO_SIZE);
|
||||||
buf = st->codec->extradata;
|
buf = st->codec->extradata;
|
||||||
bytestream_put_be16(&buf, IFF_EXTRA_VIDEO_SIZE);
|
bytestream_put_be16(&buf, IFF_EXTRA_VIDEO_SIZE);
|
||||||
bytestream_put_byte(&buf, iff->bitmap_compression);
|
bytestream_put_byte(&buf, iff->bitmap_compression);
|
||||||
|
@@ -114,7 +114,7 @@ const char * const ff_matroska_video_stereo_mode[MATROSKA_VIDEO_STEREO_MODE_COUN
|
|||||||
"bottom_top",
|
"bottom_top",
|
||||||
"top_bottom",
|
"top_bottom",
|
||||||
"checkerboard_rl",
|
"checkerboard_rl",
|
||||||
"checkerboard_lr"
|
"checkerboard_lr",
|
||||||
"row_interleaved_rl",
|
"row_interleaved_rl",
|
||||||
"row_interleaved_lr",
|
"row_interleaved_lr",
|
||||||
"col_interleaved_rl",
|
"col_interleaved_rl",
|
||||||
|
@@ -120,6 +120,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
|||||||
const int64_t xing_offtbl[2][2] = {{32, 17}, {17,9}};
|
const int64_t xing_offtbl[2][2] = {{32, 17}, {17,9}};
|
||||||
MPADecodeHeader c;
|
MPADecodeHeader c;
|
||||||
int vbrtag_size = 0;
|
int vbrtag_size = 0;
|
||||||
|
int is_cbr;
|
||||||
|
|
||||||
v = avio_rb32(s->pb);
|
v = avio_rb32(s->pb);
|
||||||
if(ff_mpa_check_header(v) < 0)
|
if(ff_mpa_check_header(v) < 0)
|
||||||
@@ -135,7 +136,8 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
|||||||
/* Check for Xing / Info tag */
|
/* Check for Xing / Info tag */
|
||||||
avio_skip(s->pb, xing_offtbl[c.lsf == 1][c.nb_channels == 1]);
|
avio_skip(s->pb, xing_offtbl[c.lsf == 1][c.nb_channels == 1]);
|
||||||
v = avio_rb32(s->pb);
|
v = avio_rb32(s->pb);
|
||||||
if(v == MKBETAG('X', 'i', 'n', 'g') || v == MKBETAG('I', 'n', 'f', 'o')) {
|
is_cbr = v == MKBETAG('I', 'n', 'f', 'o');
|
||||||
|
if (v == MKBETAG('X', 'i', 'n', 'g') || is_cbr) {
|
||||||
v = avio_rb32(s->pb);
|
v = avio_rb32(s->pb);
|
||||||
if(v & XING_FLAG_FRAMES)
|
if(v & XING_FLAG_FRAMES)
|
||||||
frames = avio_rb32(s->pb);
|
frames = avio_rb32(s->pb);
|
||||||
@@ -180,7 +182,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
|||||||
if(frames)
|
if(frames)
|
||||||
st->duration = av_rescale_q(frames, (AVRational){spf, c.sample_rate},
|
st->duration = av_rescale_q(frames, (AVRational){spf, c.sample_rate},
|
||||||
st->time_base);
|
st->time_base);
|
||||||
if(size && frames)
|
if (size && frames && !is_cbr)
|
||||||
st->codec->bit_rate = av_rescale(size, 8 * c.sample_rate, frames * (int64_t)spf);
|
st->codec->bit_rate = av_rescale(size, 8 * c.sample_rate, frames * (int64_t)spf);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -1014,6 +1014,18 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
|
|||||||
return dts;
|
return dts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int rm_read_seek(AVFormatContext *s, int stream_index,
|
||||||
|
int64_t pts, int flags)
|
||||||
|
{
|
||||||
|
RMDemuxContext *rm = s->priv_data;
|
||||||
|
|
||||||
|
if (ff_seek_frame_binary(s, stream_index, pts, flags) < 0)
|
||||||
|
return -1;
|
||||||
|
rm->audio_pkt_cnt = 0;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
AVInputFormat ff_rm_demuxer = {
|
AVInputFormat ff_rm_demuxer = {
|
||||||
.name = "rm",
|
.name = "rm",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("RealMedia"),
|
.long_name = NULL_IF_CONFIG_SMALL("RealMedia"),
|
||||||
@@ -1023,6 +1035,7 @@ AVInputFormat ff_rm_demuxer = {
|
|||||||
.read_packet = rm_read_packet,
|
.read_packet = rm_read_packet,
|
||||||
.read_close = rm_read_close,
|
.read_close = rm_read_close,
|
||||||
.read_timestamp = rm_read_dts,
|
.read_timestamp = rm_read_dts,
|
||||||
|
.read_seek = rm_read_seek,
|
||||||
};
|
};
|
||||||
|
|
||||||
AVInputFormat ff_rdt_demuxer = {
|
AVInputFormat ff_rdt_demuxer = {
|
||||||
|
@@ -642,7 +642,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename, AVInputForma
|
|||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (id3v2_extra_meta) {
|
if (id3v2_extra_meta) {
|
||||||
if (!strcmp(s->iformat->name, "mp3")) {
|
if (!strcmp(s->iformat->name, "mp3") || !strcmp(s->iformat->name, "aac")) {
|
||||||
if((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0)
|
if((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
} else
|
} else
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
40a4e41ae74ec8dacdf02402831a6a58 *./tests/data/lavf-fate/lavf.mp3
|
7fcf80c2059b5c058a6cdd2e2f798b6c *./tests/data/lavf-fate/lavf.mp3
|
||||||
97230 ./tests/data/lavf-fate/lavf.mp3
|
96366 ./tests/data/lavf-fate/lavf.mp3
|
||||||
./tests/data/lavf-fate/lavf.mp3 CRC=0x6c9850fe
|
./tests/data/lavf-fate/lavf.mp3 CRC=0x6c9850fe
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
808ea110635774252439722a48329d61 *./tests/data/images/dpx/02.dpx
|
d2f0b4e854fda2d3b3bee84cef80593c *./tests/data/images/dpx/02.dpx
|
||||||
./tests/data/images/dpx/%02d.dpx CRC=0x6da01946
|
./tests/data/images/dpx/%02d.dpx CRC=0x6da01946
|
||||||
305792 ./tests/data/images/dpx/02.dpx
|
305792 ./tests/data/images/dpx/02.dpx
|
||||||
5e1a777fa3f4094c9c4dd989cf9e8e8b *./tests/data/images/dpx/02.dpx
|
075963c3c08978b6a20555ba09161434 *./tests/data/images/dpx/02.dpx
|
||||||
./tests/data/images/dpx/%02d.dpx CRC=0xe5b9c023
|
./tests/data/images/dpx/%02d.dpx CRC=0xe5b9c023
|
||||||
609920 ./tests/data/images/dpx/02.dpx
|
609920 ./tests/data/images/dpx/02.dpx
|
||||||
13dc41b1e1e36399a5e1f8b7e3344a81 *./tests/data/images/dpx/02.dpx
|
b9f22728f8ff393bf30cf6cbd624fa95 *./tests/data/images/dpx/02.dpx
|
||||||
./tests/data/images/dpx/%02d.dpx CRC=0xf0a1c097
|
./tests/data/images/dpx/%02d.dpx CRC=0xf0a1c097
|
||||||
407168 ./tests/data/images/dpx/02.dpx
|
407168 ./tests/data/images/dpx/02.dpx
|
||||||
|
Reference in New Issue
Block a user