Compare commits
39 Commits
release/3.
...
n1.2.1
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f166a02b67 | ||
![]() |
c5948b472b | ||
![]() |
7ee5e97c46 | ||
![]() |
7ef2dbd239 | ||
![]() |
524d0d2cfc | ||
![]() |
91f04e7410 | ||
![]() |
9f7baf139f | ||
![]() |
ec89046fa1 | ||
![]() |
cc0dd86580 | ||
![]() |
0baa0a5a02 | ||
![]() |
039f6921c2 | ||
![]() |
7fa6db2545 | ||
![]() |
840931e766 | ||
![]() |
1ce3f736d2 | ||
![]() |
4d0090f90a | ||
![]() |
f8d5f3dff5 | ||
![]() |
298e03d102 | ||
![]() |
54f3902393 | ||
![]() |
3ca6253beb | ||
![]() |
84df0dc40b | ||
![]() |
a857811c75 | ||
![]() |
3d6219b6db | ||
![]() |
0a53c7016f | ||
![]() |
f0dc5c0419 | ||
![]() |
df8c36265a | ||
![]() |
c351d8781d | ||
![]() |
d553a522b9 | ||
![]() |
0b6d5f27c8 | ||
![]() |
9ecfd7daa3 | ||
![]() |
90f1aa38b6 | ||
![]() |
fc5c81ce0a | ||
![]() |
e820e3a259 | ||
![]() |
17911d0a96 | ||
![]() |
2ed7f5a670 | ||
![]() |
7c6c5767eb | ||
![]() |
0ec869527c | ||
![]() |
0b198e38c5 | ||
![]() |
1ea3248290 | ||
![]() |
bdd2db60c2 |
@@ -1,7 +1,7 @@
|
||||
Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version <next>:
|
||||
version 1.2:
|
||||
|
||||
- VDPAU hardware acceleration through normal hwaccel
|
||||
- SRTP support
|
||||
|
@@ -445,9 +445,9 @@ x86 Michael Niedermayer
|
||||
Releases
|
||||
========
|
||||
|
||||
1.2 Michael Niedermayer
|
||||
1.1 Michael Niedermayer
|
||||
1.0 Michael Niedermayer
|
||||
0.11 Michael Niedermayer
|
||||
|
||||
|
||||
|
||||
|
@@ -190,13 +190,13 @@ void show_help_options(const OptionDef *options, const char *msg, int req_flags,
|
||||
void show_help_children(const AVClass *class, int flags);
|
||||
|
||||
/**
|
||||
* Per-avtool specific help handler. Implemented in each
|
||||
* avtool, called by show_help().
|
||||
* Per-fftool specific help handler. Implemented in each
|
||||
* fftool, called by show_help().
|
||||
*/
|
||||
void show_help_default(const char *opt, const char *arg);
|
||||
|
||||
/**
|
||||
* Generic -h handler common to all avtools.
|
||||
* Generic -h handler common to all fftools.
|
||||
*/
|
||||
int show_help(void *optctx, const char *opt, const char *arg);
|
||||
|
||||
|
7
configure
vendored
7
configure
vendored
@@ -188,7 +188,7 @@ External library support:
|
||||
--enable-fontconfig enable fontconfig
|
||||
--enable-frei0r enable frei0r video filtering
|
||||
--enable-gnutls enable gnutls [no]
|
||||
--enable-iconv enable iconv [no]
|
||||
--enable-iconv enable iconv [autodetect]
|
||||
--enable-libaacplus enable AAC+ encoding via libaacplus [no]
|
||||
--enable-libass enable libass subtitles rendering [no]
|
||||
--enable-libbluray enable BluRay reading using libbluray [no]
|
||||
@@ -2169,6 +2169,9 @@ enable safe_bitstream_reader
|
||||
enable static
|
||||
enable swscale_alpha
|
||||
|
||||
# By default, enable only those hwaccels that have no external dependencies.
|
||||
enable dxva2 vdpau
|
||||
|
||||
# build settings
|
||||
SHFLAGS='-shared -Wl,-soname,$$(@F)'
|
||||
FFSERVERLDFLAGS=-Wl,-E
|
||||
@@ -4053,7 +4056,7 @@ enabled vdpau &&
|
||||
disable vdpau
|
||||
|
||||
# Funny iconv installations are not unusual, so check it after all flags have been set
|
||||
enabled iconv && { check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || die "ERROR: iconv not found"; }
|
||||
disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || disable iconv
|
||||
|
||||
enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
|
||||
enabled coverage && add_cflags "-fprofile-arcs -ftest-coverage" && add_ldflags "-fprofile-arcs -ftest-coverage"
|
||||
|
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER =
|
||||
PROJECT_NUMBER = 1.2.1
|
||||
|
||||
# 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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
* 0.10 "Freedom" January, 2012
|
||||
* 1.2 "Magic" March, 2013
|
||||
|
||||
|
||||
General notes
|
||||
@@ -14,9 +14,3 @@ accepted. If you are experiencing issues with any formally released version of
|
||||
FFmpeg, please try git master to check if the issue still exists. If it does,
|
||||
make your report against the development code following the usual bug reporting
|
||||
guidelines.
|
||||
|
||||
Of big interest to our Windows users, FFmpeg now supports building with the MSVC
|
||||
compiler. Since MSVC does not support C99 features used extensively by FFmpeg,
|
||||
this has been accomplished using a converter that turns C99 code to C89. See the
|
||||
platform-specific documentation for more detailed documentation on building
|
||||
FFmpeg with MSVC.
|
||||
|
@@ -300,7 +300,9 @@ static int cdg_decode_frame(AVCodecContext *avctx,
|
||||
inst = bytestream_get_byte(&buf);
|
||||
inst &= CDG_MASK;
|
||||
buf += 2; /// skipping 2 unneeded bytes
|
||||
bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
|
||||
|
||||
if (buf_size > CDG_HEADER_SIZE)
|
||||
bytestream_get_buffer(&buf, cdg_data, buf_size - CDG_HEADER_SIZE);
|
||||
|
||||
if ((command & CDG_MASK) == CDG_COMMAND) {
|
||||
switch (inst) {
|
||||
|
@@ -212,6 +212,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
buf[803] = s->bits_per_component;
|
||||
write16(buf + 804, (s->bits_per_component == 10 || s->bits_per_component == 12) ?
|
||||
1 : 0); /* packing method */
|
||||
write32(buf + 808, HEADER_SIZE); /* data offset */
|
||||
|
||||
/* Image source information header */
|
||||
write32(buf + 1628, avctx->sample_aspect_ratio.num);
|
||||
|
@@ -348,7 +348,8 @@ static int decode_block(AVCodecContext *avctx, void *tdata,
|
||||
const uint8_t *src;
|
||||
int axmax = (avctx->width - (s->xmax + 1)) * 2 * s->desc->nb_components;
|
||||
int bxmin = s->xmin * 2 * s->desc->nb_components;
|
||||
int ret, i, x, buf_size = s->buf_size;
|
||||
int i, x, buf_size = s->buf_size;
|
||||
int av_unused ret;
|
||||
|
||||
line_offset = AV_RL64(s->table + jobnr * 8);
|
||||
// Check if the buffer has the required bytes needed from the offset
|
||||
|
@@ -27,7 +27,7 @@ const int ff_flac_sample_rate_table[16] =
|
||||
8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000,
|
||||
0, 0, 0, 0 };
|
||||
|
||||
const int16_t ff_flac_blocksize_table[16] = {
|
||||
const int32_t ff_flac_blocksize_table[16] = {
|
||||
0, 192, 576<<0, 576<<1, 576<<2, 576<<3, 0, 0,
|
||||
256<<0, 256<<1, 256<<2, 256<<3, 256<<4, 256<<5, 256<<6, 256<<7
|
||||
};
|
||||
|
@@ -26,6 +26,6 @@
|
||||
|
||||
extern const int ff_flac_sample_rate_table[16];
|
||||
|
||||
extern const int16_t ff_flac_blocksize_table[16];
|
||||
extern const int32_t ff_flac_blocksize_table[16];
|
||||
|
||||
#endif /* AVCODEC_FLACDATA_H */
|
||||
|
@@ -462,6 +462,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, A
|
||||
|
||||
if (s->keyframe) {
|
||||
s->keyframe_ok = 0;
|
||||
s->gce_prev_disposal = GCE_DISPOSAL_NONE;
|
||||
if ((ret = gif_read_header1(s)) < 0)
|
||||
return ret;
|
||||
|
||||
|
@@ -175,7 +175,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_B ? X264_TYPE_B :
|
||||
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;
|
||||
x264_encoder_reconfig(x4->enc, &x4->params);
|
||||
}
|
||||
|
@@ -747,7 +747,9 @@ static void handle_rstn(MJpegDecodeContext *s, int nb_components)
|
||||
|
||||
i = 8 + ((-get_bits_count(&s->gb)) & 7);
|
||||
/* skip RSTn */
|
||||
if (s->restart_count == 0 && show_bits(&s->gb, i) == (1 << i) - 1) {
|
||||
if (s->restart_count == 0) {
|
||||
if( show_bits(&s->gb, i) == (1 << i) - 1
|
||||
|| show_bits(&s->gb, i) == 0xFF) {
|
||||
int pos = get_bits_count(&s->gb);
|
||||
align_get_bits(&s->gb);
|
||||
while (get_bits_left(&s->gb) >= 8 && show_bits(&s->gb, 8) == 0xFF)
|
||||
@@ -757,6 +759,7 @@ static void handle_rstn(MJpegDecodeContext *s, int nb_components)
|
||||
s->last_dc[i] = 1024;
|
||||
} else
|
||||
skip_bits_long(&s->gb, pos - get_bits_count(&s->gb));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1636,6 +1639,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
||||
MJpegDecodeContext *s = avctx->priv_data;
|
||||
const uint8_t *buf_end, *buf_ptr;
|
||||
const uint8_t *unescaped_buf_ptr;
|
||||
int hshift, vshift;
|
||||
int unescaped_buf_size;
|
||||
int start_code;
|
||||
int i, index;
|
||||
@@ -1814,6 +1818,9 @@ the_end:
|
||||
}
|
||||
if (s->upscale_v) {
|
||||
uint8_t *dst = &((uint8_t *)s->picture_ptr->data[s->upscale_v])[(s->height - 1) * s->linesize[s->upscale_v]];
|
||||
int w;
|
||||
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift);
|
||||
w = s->width >> hshift;
|
||||
av_assert0(avctx->pix_fmt == AV_PIX_FMT_YUVJ444P ||
|
||||
avctx->pix_fmt == AV_PIX_FMT_YUV444P ||
|
||||
avctx->pix_fmt == AV_PIX_FMT_YUVJ422P ||
|
||||
@@ -1822,16 +1829,16 @@ the_end:
|
||||
uint8_t *src1 = &((uint8_t *)s->picture_ptr->data[s->upscale_v])[i / 2 * s->linesize[s->upscale_v]];
|
||||
uint8_t *src2 = &((uint8_t *)s->picture_ptr->data[s->upscale_v])[(i + 1) / 2 * s->linesize[s->upscale_v]];
|
||||
if (src1 == src2) {
|
||||
memcpy(dst, src1, s->width);
|
||||
memcpy(dst, src1, w);
|
||||
} else {
|
||||
for (index = 0; index < s->width; index++)
|
||||
for (index = 0; index < w; index++)
|
||||
dst[index] = (src1[index] + src2[index]) >> 1;
|
||||
}
|
||||
dst -= s->linesize[s->upscale_v];
|
||||
}
|
||||
}
|
||||
if (s->flipped && (s->avctx->flags & CODEC_FLAG_EMU_EDGE)) {
|
||||
int hshift, vshift, j;
|
||||
int j;
|
||||
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, &hshift, &vshift);
|
||||
for (index=0; index<4; index++) {
|
||||
uint8_t *dst = s->picture_ptr->data[index];
|
||||
|
@@ -104,6 +104,9 @@ static int mm_decode_intra(MmContext * s, int half_horiz, int half_vert)
|
||||
if (half_horiz)
|
||||
run_length *=2;
|
||||
|
||||
if (run_length > s->avctx->width - x)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (color) {
|
||||
memset(s->frame.data[0] + y*s->frame.linesize[0] + x, color, run_length);
|
||||
if (half_vert)
|
||||
@@ -151,6 +154,8 @@ static int mm_decode_inter(MmContext * s, int half_horiz, int half_vert)
|
||||
int replace_array = bytestream2_get_byte(&s->gb);
|
||||
for(j=0; j<8; j++) {
|
||||
int replace = (replace_array >> (7-j)) & 1;
|
||||
if (x + half_horiz >= s->avctx->width)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (replace) {
|
||||
int color = bytestream2_get_byte(&data_ptr);
|
||||
s->frame.data[0][y*s->frame.linesize[0] + x] = color;
|
||||
|
@@ -2221,7 +2221,7 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
|
||||
ptr_cb = ref_picture[1] + uvsrc_y * uvlinesize + uvsrc_x;
|
||||
ptr_cr = ref_picture[2] + uvsrc_y * uvlinesize + uvsrc_x;
|
||||
|
||||
if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) ||
|
||||
if ((unsigned) src_x > FFMAX( h_edge_pos - (!!sx) - 2 * block_s, 0) || uvsrc_y<0 ||
|
||||
(unsigned) src_y > FFMAX((v_edge_pos >> field_based) - (!!sy) - h, 0)) {
|
||||
s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y,
|
||||
linesize >> field_based, 17, 17 + field_based,
|
||||
@@ -2261,11 +2261,12 @@ static av_always_inline void mpeg_motion_lowres(MpegEncContext *s,
|
||||
pix_op[lowres - 1](dest_y, ptr_y, linesize, h, sx, sy);
|
||||
|
||||
if (!CONFIG_GRAY || !(s->flags & CODEC_FLAG_GRAY)) {
|
||||
int hc = s->chroma_y_shift ? (h+1-bottom_field)>>1 : h;
|
||||
uvsx = (uvsx << 2) >> lowres;
|
||||
uvsy = (uvsy << 2) >> lowres;
|
||||
if (h >> s->chroma_y_shift) {
|
||||
pix_op[op_index](dest_cb, ptr_cb, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
|
||||
pix_op[op_index](dest_cr, ptr_cr, uvlinesize, h >> s->chroma_y_shift, uvsx, uvsy);
|
||||
if (hc) {
|
||||
pix_op[op_index](dest_cb, ptr_cb, uvlinesize, hc, uvsx, uvsy);
|
||||
pix_op[op_index](dest_cr, ptr_cr, uvlinesize, hc, uvsx, uvsy);
|
||||
}
|
||||
}
|
||||
// FIXME h261 lowres loop filter
|
||||
|
@@ -739,6 +739,11 @@ static int process_frame_obj(SANMVideoContext *ctx)
|
||||
w = bytestream2_get_le16u(&ctx->gb);
|
||||
h = bytestream2_get_le16u(&ctx->gb);
|
||||
|
||||
if (!w || !h) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "dimensions are invalid\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (ctx->width < left + w || ctx->height < top + h) {
|
||||
if (av_image_check_size(FFMAX(left + w, ctx->width),
|
||||
FFMAX(top + h, ctx->height), 0, ctx->avctx) < 0)
|
||||
|
@@ -1938,7 +1938,7 @@ static int recode_subtitle(AVCodecContext *avctx,
|
||||
goto end;
|
||||
}
|
||||
outpkt->size -= outl;
|
||||
outpkt->data[outpkt->size - 1] = '\0';
|
||||
memset(outpkt->data + outpkt->size, 0, outl);
|
||||
|
||||
end:
|
||||
if (cd != (iconv_t)-1)
|
||||
|
@@ -212,7 +212,7 @@ int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)
|
||||
ff_mpeg_draw_horiz_band(s, 0, s->avctx->height);
|
||||
|
||||
finish:
|
||||
ff_vaapi_common_end_frame(avctx->priv_data);
|
||||
ff_vaapi_common_end_frame(avctx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -162,7 +162,7 @@ static int rle_unpack(const unsigned char *src, int src_len, int src_count,
|
||||
const unsigned char *ps;
|
||||
const unsigned char *ps_end;
|
||||
unsigned char *pd;
|
||||
int i, l;
|
||||
int i, j, l;
|
||||
unsigned char *dest_end = dest + dest_len;
|
||||
|
||||
ps = src;
|
||||
@@ -188,9 +188,9 @@ static int rle_unpack(const unsigned char *src, int src_len, int src_count,
|
||||
ps += l;
|
||||
pd += l;
|
||||
} else {
|
||||
if (dest_end - pd < i || ps_end - ps < 2)
|
||||
if (dest_end - pd < 2*l || ps_end - ps < 2)
|
||||
return ps - src;
|
||||
for (i = 0; i < l; i++) {
|
||||
for (j = 0; j < l; j++) {
|
||||
*pd++ = ps[0];
|
||||
*pd++ = ps[1];
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
int number, len;
|
||||
|
||||
ptr += strcspn(ptr, "#");
|
||||
if (sscanf(ptr, "#define %256s %u", name, &number) != 2) {
|
||||
if (sscanf(ptr, "#define %255s %u", name, &number) != 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unexpected preprocessor directive\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@@ -91,13 +91,13 @@ static int movie_request_frame(AVFilterLink *outlink);
|
||||
static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec)
|
||||
{
|
||||
int i, ret, already = 0, stream_id = -1;
|
||||
char type_char, dummy;
|
||||
char type_char[2], dummy;
|
||||
AVStream *found = NULL;
|
||||
enum AVMediaType type;
|
||||
|
||||
ret = sscanf(spec, "d%[av]%d%c", &type_char, &stream_id, &dummy);
|
||||
ret = sscanf(spec, "d%1[av]%d%c", type_char, &stream_id, &dummy);
|
||||
if (ret >= 1 && ret <= 2) {
|
||||
type = type_char == 'v' ? AVMEDIA_TYPE_VIDEO : AVMEDIA_TYPE_AUDIO;
|
||||
type = type_char[0] == 'v' ? AVMEDIA_TYPE_VIDEO : AVMEDIA_TYPE_AUDIO;
|
||||
ret = av_find_best_stream(avf, type, stream_id, -1, NULL, 0);
|
||||
if (ret < 0) {
|
||||
av_log(log, AV_LOG_ERROR, "No %s stream with index '%d' found\n",
|
||||
|
@@ -332,7 +332,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx, const char *args)
|
||||
pkt.size = 0;
|
||||
while (av_read_frame(fmt, &pkt) >= 0) {
|
||||
int i, got_subtitle;
|
||||
AVSubtitle sub;
|
||||
AVSubtitle sub = {0};
|
||||
|
||||
if (pkt.stream_index == sid) {
|
||||
ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_subtitle, &pkt);
|
||||
|
@@ -192,7 +192,7 @@ static int aiff_probe(AVProbeData *p)
|
||||
static int aiff_read_header(AVFormatContext *s)
|
||||
{
|
||||
int ret, size, filesize;
|
||||
int64_t offset = 0;
|
||||
int64_t offset = 0, position;
|
||||
uint32_t tag;
|
||||
unsigned version = AIFF_C_VERSION1;
|
||||
AVIOContext *pb = s->pb;
|
||||
@@ -236,6 +236,7 @@ static int aiff_read_header(AVFormatContext *s)
|
||||
goto got_sound;
|
||||
break;
|
||||
case MKTAG('I', 'D', '3', ' '):
|
||||
position = avio_tell(pb);
|
||||
ff_id3v2_read(s, ID3v2_DEFAULT_MAGIC, &id3v2_extra_meta);
|
||||
if (id3v2_extra_meta)
|
||||
if ((ret = ff_id3v2_parse_apic(s, &id3v2_extra_meta)) < 0) {
|
||||
@@ -243,6 +244,8 @@ static int aiff_read_header(AVFormatContext *s)
|
||||
return ret;
|
||||
}
|
||||
ff_id3v2_free_extra_meta(&id3v2_extra_meta);
|
||||
if (position + size > avio_tell(pb))
|
||||
avio_skip(pb, position + size - avio_tell(pb));
|
||||
break;
|
||||
case MKTAG('F', 'V', 'E', 'R'): /* Version chunk */
|
||||
version = avio_rb32(pb);
|
||||
|
@@ -493,10 +493,13 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
return ret;
|
||||
} else if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
if (!s->streams[pkt->stream_index]->nb_frames) {
|
||||
av_log(s, AV_LOG_ERROR, "Malformed AAC bitstream detected: "
|
||||
"use audio bitstream filter 'aac_adtstoasc' to fix it "
|
||||
"('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
|
||||
}
|
||||
|
||||
if (flv->delay == AV_NOPTS_VALUE)
|
||||
|
@@ -1916,10 +1916,10 @@ static void matroska_clear_queue(MatroskaDemuxContext *matroska)
|
||||
}
|
||||
|
||||
static int matroska_parse_laces(MatroskaDemuxContext *matroska, uint8_t **buf,
|
||||
int size, int type,
|
||||
int* buf_size, int type,
|
||||
uint32_t **lace_buf, int *laces)
|
||||
{
|
||||
int res = 0, n;
|
||||
int res = 0, n, size = *buf_size;
|
||||
uint8_t *data = *buf;
|
||||
uint32_t *lace_size;
|
||||
|
||||
@@ -2017,6 +2017,7 @@ static int matroska_parse_laces(MatroskaDemuxContext *matroska, uint8_t **buf,
|
||||
|
||||
*buf = data;
|
||||
*lace_buf = lace_size;
|
||||
*buf_size = size;
|
||||
|
||||
return res;
|
||||
}
|
||||
@@ -2252,7 +2253,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
|
||||
matroska->skip_to_keyframe = 0;
|
||||
}
|
||||
|
||||
res = matroska_parse_laces(matroska, &data, size, (flags & 0x06) >> 1,
|
||||
res = matroska_parse_laces(matroska, &data, &size, (flags & 0x06) >> 1,
|
||||
&lace_size, &laces);
|
||||
|
||||
if (res)
|
||||
@@ -2359,7 +2360,6 @@ static int matroska_parse_cluster_incremental(MatroskaDemuxContext *matroska)
|
||||
}
|
||||
}
|
||||
|
||||
if (res < 0) matroska->done = 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@@ -3173,6 +3173,14 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
memcpy(trk->vos_data, enc->extradata, trk->vos_len);
|
||||
}
|
||||
|
||||
if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
if (!s->streams[pkt->stream_index]->nb_frames) {
|
||||
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
|
||||
}
|
||||
if (enc->codec_id == AV_CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
|
||||
/* from x264 or from bytestream h264 */
|
||||
/* nal reformating needed */
|
||||
@@ -3183,10 +3191,6 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
} else {
|
||||
size = ff_avc_parse_nal_units(pb, pkt->data, pkt->size);
|
||||
}
|
||||
} else if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
} else {
|
||||
avio_write(pb, pkt->data, size);
|
||||
}
|
||||
|
@@ -208,9 +208,6 @@ static void clear_program(MpegTSContext *ts, unsigned int programid)
|
||||
|
||||
static void clear_programs(MpegTSContext *ts)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<ts->nb_prg; i++)
|
||||
clear_avprogram(ts, ts->prg[i].id);
|
||||
av_freep(&ts->prg);
|
||||
ts->nb_prg=0;
|
||||
}
|
||||
@@ -1636,6 +1633,17 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
||||
add_pid_to_pmt(ts, sid, pmt_pid);
|
||||
}
|
||||
}
|
||||
|
||||
if (sid < 0) {
|
||||
int i,j;
|
||||
for (j=0; j<ts->stream->nb_programs; j++) {
|
||||
for (i=0; i<ts->nb_prg; i++)
|
||||
if (ts->prg[i].id == ts->stream->programs[j]->id)
|
||||
break;
|
||||
if (i==ts->nb_prg)
|
||||
clear_avprogram(ts, ts->stream->programs[j]->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sdt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len)
|
||||
|
@@ -1000,6 +1000,18 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
|
||||
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 = {
|
||||
.name = "rm",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("RealMedia"),
|
||||
@@ -1009,6 +1021,7 @@ AVInputFormat ff_rm_demuxer = {
|
||||
.read_packet = rm_read_packet,
|
||||
.read_close = rm_read_close,
|
||||
.read_timestamp = rm_read_dts,
|
||||
.read_seek = rm_read_seek,
|
||||
};
|
||||
|
||||
AVInputFormat ff_rdt_demuxer = {
|
||||
|
@@ -276,7 +276,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
} else if(t & 0x40){ /* copy with offset */
|
||||
off = avio_r8(s->pb);
|
||||
j = (t & 0x3F) + 1;
|
||||
if (off + j > 0xff) {
|
||||
if (off + j - 1 > 0xff) {
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
"Invalid palette update, offset=%d length=%d extends beyond palette size\n",
|
||||
off, j);
|
||||
|
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include "common.h"
|
||||
#include "mathematics.h"
|
||||
#include "intfloat_readwrite.h"
|
||||
|
||||
@@ -88,7 +89,7 @@ AVExtFloat av_dbl2ext(double d){
|
||||
ext.mantissa[i] = m>>(56-(i<<3));
|
||||
} else if (f != 0.0) {
|
||||
ext.exponent[0] = 0x7f; ext.exponent[1] = 0xff;
|
||||
if (f != INFINITY)
|
||||
if (!isinf(f))
|
||||
ext.mantissa[0] = ~0;
|
||||
}
|
||||
if (d < 0)
|
||||
|
@@ -178,7 +178,7 @@ static void format_line(void *ptr, int level, const char *fmt, va_list vl,
|
||||
if (parent && *parent) {
|
||||
snprintf(part[0], part_size, "[%s @ %p] ",
|
||||
(*parent)->item_name(parent), parent);
|
||||
if(type) type[0] = get_category(((uint8_t *) ptr) + avc->parent_log_context_offset);
|
||||
if(type) type[0] = get_category(parent);
|
||||
}
|
||||
}
|
||||
snprintf(part[1], part_size, "[%s @ %p] ",
|
||||
|
@@ -95,7 +95,11 @@ void *av_malloc(size_t size)
|
||||
#elif HAVE_ALIGNED_MALLOC
|
||||
ptr = _aligned_malloc(size, ALIGN);
|
||||
#elif HAVE_MEMALIGN
|
||||
#ifndef __DJGPP__
|
||||
ptr = memalign(ALIGN, size);
|
||||
#else
|
||||
ptr = memalign(size, ALIGN);
|
||||
#endif
|
||||
/* Why 64?
|
||||
* Indeed, we should align it:
|
||||
* on 4 for 386
|
||||
|
@@ -1 +1 @@
|
||||
a39d7e299a8e25b4ffece0f8d64bf19e
|
||||
9615088d613931b50fd5016c7535b99a
|
||||
|
@@ -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
|
||||
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
|
||||
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=0xb6310a70
|
||||
407168 ./tests/data/images/dpx/02.dpx
|
||||
|
Reference in New Issue
Block a user