Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
b06903e6c5 | |||
a5069caecd | |||
b5e72345a6 | |||
99dbda3008 | |||
d721cb009d | |||
55b3e408fa | |||
9f1e01c991 | |||
450e4b1a60 | |||
3581ab6ce0 | |||
f1ec792ae3 | |||
05e64b51bb | |||
3593f577b0 | |||
72791e41d4 | |||
4155968fc6 | |||
d14ce69869 | |||
b45a8f6d24 | |||
ae8491ce33 | |||
3f78fe1d56 | |||
fb52da522c | |||
5231a35559 | |||
606538df6c | |||
a19010f7a6 |
@ -3,6 +3,12 @@ releases are sorted from youngest to oldest.
|
||||
|
||||
version next:
|
||||
|
||||
version 0.11.2:
|
||||
|
||||
- Several bugs and crashes have been fixed as well as build problems
|
||||
with recent mingw64
|
||||
|
||||
|
||||
version 0.11:
|
||||
Fixes:CVE-2012-2772, CVE-2012-2774, CVE-2012-2775, CVE-2012-2776, CVE-2012-2777,
|
||||
CVE-2012-2779, CVE-2012-2782, CVE-2012-2783, CVE-2012-2784, CVE-2012-2785,
|
||||
|
2
Doxyfile
2
Doxyfile
@ -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 = 0.11.1
|
||||
PROJECT_NUMBER = 0.11.2
|
||||
|
||||
# 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
|
||||
|
8
configure
vendored
8
configure
vendored
@ -1173,6 +1173,7 @@ HAVE_LIST="
|
||||
dlfcn_h
|
||||
dlopen
|
||||
dos_paths
|
||||
dxva_h
|
||||
ebp_available
|
||||
ebx_available
|
||||
exp2
|
||||
@ -1217,7 +1218,6 @@ HAVE_LIST="
|
||||
memalign
|
||||
mkstemp
|
||||
mmap
|
||||
netinet_sctp_h
|
||||
PeekNamedPipe
|
||||
poll_h
|
||||
posix_memalign
|
||||
@ -1237,6 +1237,7 @@ HAVE_LIST="
|
||||
struct_addrinfo
|
||||
struct_ipv6_mreq
|
||||
struct_rusage_ru_maxrss
|
||||
struct_sctp_event_subscribe
|
||||
struct_sockaddr_in6
|
||||
struct_sockaddr_sa_len
|
||||
struct_sockaddr_storage
|
||||
@ -1665,7 +1666,7 @@ mmst_protocol_deps="network"
|
||||
rtmp_protocol_deps="!librtmp_protocol"
|
||||
rtmp_protocol_select="tcp_protocol"
|
||||
rtp_protocol_select="udp_protocol"
|
||||
sctp_protocol_deps="network netinet_sctp_h"
|
||||
sctp_protocol_deps="network struct_sctp_event_subscribe"
|
||||
tcp_protocol_deps="network"
|
||||
tls_protocol_deps_any="openssl gnutls"
|
||||
tls_protocol_select="tcp_protocol"
|
||||
@ -3070,7 +3071,7 @@ if enabled network; then
|
||||
check_type netinet/in.h "struct sockaddr_in6"
|
||||
check_type "sys/types.h sys/socket.h" "struct sockaddr_storage"
|
||||
check_struct "sys/types.h sys/socket.h" "struct sockaddr" sa_len
|
||||
check_header netinet/sctp.h
|
||||
check_type netinet/sctp.h "struct sctp_event_subscribe"
|
||||
# Prefer arpa/inet.h over winsock2
|
||||
if check_header arpa/inet.h ; then
|
||||
check_func closesocket
|
||||
@ -3125,6 +3126,7 @@ check_func_headers windows.h VirtualAlloc
|
||||
check_func_headers glob.h glob
|
||||
|
||||
check_header dlfcn.h
|
||||
check_header dxva.h
|
||||
check_header dxva2api.h -D_WIN32_WINNT=0x0600
|
||||
check_header libcrystalhd/libcrystalhd_if.h
|
||||
check_header malloc.h
|
||||
|
@ -35,7 +35,7 @@ GENTEXI = format codec
|
||||
GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
|
||||
|
||||
$(GENTEXI): TAG = GENTEXI
|
||||
$(GENTEXI): doc/avoptions_%.texi: doc/print_options
|
||||
$(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
|
||||
$(M)doc/print_options $* > $@
|
||||
|
||||
doc/%.html: TAG = HTML
|
||||
|
@ -340,6 +340,10 @@ prefix is ``ffmpeg2pass''. The complete file name will be
|
||||
@file{PREFIX-N.log}, where N is a number specific to the output
|
||||
stream
|
||||
|
||||
Note that this option is overwritten by a local option of the same name
|
||||
when using @code{-vcodec libx264}. That option maps to the x264 option stats
|
||||
which has a different syntax.
|
||||
|
||||
@item -vlang @var{code}
|
||||
Set the ISO 639 language code (3 letters) of the current video stream.
|
||||
|
||||
|
@ -66,7 +66,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
const uint8_t *buf = avpkt->data;
|
||||
int buf_size = avpkt->size;
|
||||
AascContext *s = avctx->priv_data;
|
||||
int compr, i, stride;
|
||||
int compr, i, stride, psize;
|
||||
|
||||
s->frame.reference = 3;
|
||||
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
|
||||
@ -78,6 +78,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
compr = AV_RL32(buf);
|
||||
buf += 4;
|
||||
buf_size -= 4;
|
||||
psize = avctx->bits_per_coded_sample / 8;
|
||||
switch (avctx->codec_tag) {
|
||||
case MKTAG('A', 'A', 'S', '4'):
|
||||
bytestream2_init(&s->gb, buf - 4, buf_size + 4);
|
||||
@ -86,13 +87,13 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
case MKTAG('A', 'A', 'S', 'C'):
|
||||
switch(compr){
|
||||
case 0:
|
||||
stride = (avctx->width * 3 + 3) & ~3;
|
||||
stride = (avctx->width * psize + psize) & ~psize;
|
||||
for(i = avctx->height - 1; i >= 0; i--){
|
||||
if(avctx->width*3 > buf_size){
|
||||
if(avctx->width * psize > buf_size){
|
||||
av_log(avctx, AV_LOG_ERROR, "Next line is beyond buffer bounds\n");
|
||||
break;
|
||||
}
|
||||
memcpy(s->frame.data[0] + i*s->frame.linesize[0], buf, avctx->width*3);
|
||||
memcpy(s->frame.data[0] + i*s->frame.linesize[0], buf, avctx->width * psize);
|
||||
buf += stride;
|
||||
buf_size -= stride;
|
||||
}
|
||||
|
@ -268,6 +268,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
c->avctx = avctx;
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
|
||||
if (avctx->width != SCREEN_WIDE || avctx->height != SCREEN_HIGH) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid dimension %dx%d\n", avctx->width, avctx->height);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
c->pic.reference = 1;
|
||||
if (avctx->get_buffer(avctx, &c->pic) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
|
@ -25,7 +25,14 @@
|
||||
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define COBJMACROS
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "dxva2.h"
|
||||
#if HAVE_DXVA_H
|
||||
#include <dxva.h>
|
||||
#endif
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "mpegvideo.h"
|
||||
|
||||
|
@ -48,7 +48,7 @@ typedef struct Escape124Context {
|
||||
CodeBook codebooks[3];
|
||||
} Escape124Context;
|
||||
|
||||
static int can_safely_read(GetBitContext* gb, int bits) {
|
||||
static int can_safely_read(GetBitContext* gb, uint64_t bits) {
|
||||
return get_bits_left(gb) >= bits;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ static CodeBook unpack_codebook(GetBitContext* gb, unsigned depth,
|
||||
unsigned i, j;
|
||||
CodeBook cb = { 0 };
|
||||
|
||||
if (!can_safely_read(gb, size * 34))
|
||||
if (!can_safely_read(gb, size * 34L))
|
||||
return cb;
|
||||
|
||||
if (size >= INT_MAX / sizeof(MacroBlock))
|
||||
|
@ -228,7 +228,7 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
|
||||
mode = !mode;
|
||||
}
|
||||
//sync line pointers
|
||||
while(run_off <= offs){
|
||||
while(offs < width && run_off <= offs){
|
||||
run_off += *ref++;
|
||||
run_off += *ref++;
|
||||
}
|
||||
|
@ -53,6 +53,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
|
||||
int inc= FFMIN(buf_size - i, s->frame_size);
|
||||
i += inc;
|
||||
s->frame_size -= inc;
|
||||
state = 0;
|
||||
|
||||
if(!s->frame_size){
|
||||
next= i;
|
||||
|
@ -79,6 +79,7 @@ typedef struct ThreadContext {
|
||||
pthread_cond_t current_job_cond;
|
||||
pthread_mutex_t current_job_lock;
|
||||
int current_job;
|
||||
unsigned int current_execute;
|
||||
int done;
|
||||
} ThreadContext;
|
||||
|
||||
@ -203,6 +204,7 @@ static void* attribute_align_arg worker(void *v)
|
||||
AVCodecContext *avctx = v;
|
||||
ThreadContext *c = avctx->thread_opaque;
|
||||
int our_job = c->job_count;
|
||||
int last_execute = 0;
|
||||
int thread_count = avctx->thread_count;
|
||||
int self_id;
|
||||
|
||||
@ -213,7 +215,9 @@ static void* attribute_align_arg worker(void *v)
|
||||
if (c->current_job == thread_count + c->job_count)
|
||||
pthread_cond_signal(&c->last_job_cond);
|
||||
|
||||
pthread_cond_wait(&c->current_job_cond, &c->current_job_lock);
|
||||
while (last_execute == c->current_execute && !c->done)
|
||||
pthread_cond_wait(&c->current_job_cond, &c->current_job_lock);
|
||||
last_execute = c->current_execute;
|
||||
our_job = self_id;
|
||||
|
||||
if (c->done) {
|
||||
@ -233,7 +237,8 @@ static void* attribute_align_arg worker(void *v)
|
||||
|
||||
static av_always_inline void avcodec_thread_park_workers(ThreadContext *c, int thread_count)
|
||||
{
|
||||
pthread_cond_wait(&c->last_job_cond, &c->current_job_lock);
|
||||
while (c->current_job != thread_count + c->job_count)
|
||||
pthread_cond_wait(&c->last_job_cond, &c->current_job_lock);
|
||||
pthread_mutex_unlock(&c->current_job_lock);
|
||||
}
|
||||
|
||||
@ -282,6 +287,7 @@ static int avcodec_thread_execute(AVCodecContext *avctx, action_func* func, void
|
||||
c->rets = &dummy_ret;
|
||||
c->rets_count = 1;
|
||||
}
|
||||
c->current_execute++;
|
||||
pthread_cond_broadcast(&c->current_job_cond);
|
||||
|
||||
avcodec_thread_park_workers(c, avctx->thread_count);
|
||||
|
@ -72,7 +72,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
|
||||
for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
|
||||
recoded[j++] = buf[i];
|
||||
else
|
||||
for (i = 14; i < buf_size && j < buf_size+1024-2; i++)
|
||||
for (i = 14; i < buf_size && j < buf_size+1024-3; i++)
|
||||
{
|
||||
recoded[j++] = buf[i];
|
||||
if (buf[i] == 0xff)
|
||||
|
@ -85,8 +85,6 @@ static int encode_init(AVCodecContext * avctx){
|
||||
(avctx->sample_rate * 8);
|
||||
s->block_align = FFMIN(s->block_align, MAX_CODED_SUPERFRAME_SIZE);
|
||||
avctx->block_align = s->block_align;
|
||||
avctx->bit_rate = avctx->block_align * 8LL * avctx->sample_rate /
|
||||
s->frame_len;
|
||||
//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d\n", s->block_align, avctx->bit_rate, s->frame_len, avctx->sample_rate);
|
||||
avctx->frame_size = avctx->delay = s->frame_len;
|
||||
|
||||
|
@ -176,6 +176,9 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
|
||||
|
||||
|
||||
avfilter_copy_buffer_ref_props(outsamplesref, insamplesref);
|
||||
outsamplesref->format = outlink->format;
|
||||
outsamplesref->audio->channel_layout = outlink->channel_layout;
|
||||
outsamplesref->audio->sample_rate = outlink->sample_rate;
|
||||
|
||||
if(insamplesref->pts != AV_NOPTS_VALUE) {
|
||||
int64_t inpts = av_rescale(insamplesref->pts, inlink->time_base.num * (int64_t)outlink->sample_rate * inlink->sample_rate, inlink->time_base.den);
|
||||
|
@ -204,7 +204,7 @@ void ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)
|
||||
link->cur_buf->audio->sample_rate = samplesref->audio->sample_rate;
|
||||
|
||||
/* Copy actual data into new samples buffer */
|
||||
for (i = 0; samplesref->data[i] && i < 8; i++)
|
||||
for (i = 0; i < 8 && samplesref->data[i]; i++)
|
||||
memcpy(link->cur_buf->data[i], samplesref->data[i], samplesref->linesize[0]);
|
||||
for (i = 0; i < planes; i++)
|
||||
memcpy(link->cur_buf->extended_data[i], samplesref->extended_data[i], samplesref->linesize[0]);
|
||||
|
@ -336,6 +336,13 @@ static int ogg_read_page(AVFormatContext *s, int *str)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief find the next Ogg packet
|
||||
* @param *str is set to the stream for the packet or -1 if there is
|
||||
* no matching stream, in that case assume all other return
|
||||
* values to be uninitialized.
|
||||
* @return negative value on error or EOF.
|
||||
*/
|
||||
static int ogg_packet(AVFormatContext *s, int *str, int *dstart, int *dsize,
|
||||
int64_t *fpos)
|
||||
{
|
||||
@ -346,6 +353,8 @@ static int ogg_packet(AVFormatContext *s, int *str, int *dstart, int *dsize,
|
||||
int segp = 0, psize = 0;
|
||||
|
||||
av_dlog(s, "ogg_packet: curidx=%i\n", ogg->curidx);
|
||||
if (str)
|
||||
*str = -1;
|
||||
|
||||
do{
|
||||
idx = ogg->curidx;
|
||||
@ -524,8 +533,10 @@ static int ogg_get_length(AVFormatContext *s)
|
||||
ogg_save (s);
|
||||
avio_seek (s->pb, s->data_offset, SEEK_SET);
|
||||
ogg_reset(s);
|
||||
while (!ogg_packet(s, &i, NULL, NULL, NULL)) {
|
||||
int64_t pts = ogg_calc_pts(s, i, NULL);
|
||||
while (streams_left > 0 && !ogg_packet(s, &i, NULL, NULL, NULL)) {
|
||||
int64_t pts;
|
||||
if (i < 0) continue;
|
||||
pts = ogg_calc_pts(s, i, NULL);
|
||||
if (pts != AV_NOPTS_VALUE && s->streams[i]->start_time == AV_NOPTS_VALUE && !ogg->streams[i].got_start){
|
||||
s->streams[i]->duration -= pts;
|
||||
ogg->streams[i].got_start= 1;
|
||||
@ -534,8 +545,6 @@ static int ogg_get_length(AVFormatContext *s)
|
||||
ogg->streams[i].got_start= 1;
|
||||
streams_left--;
|
||||
}
|
||||
if(streams_left<=0)
|
||||
break;
|
||||
}
|
||||
ogg_restore (s, 0);
|
||||
|
||||
@ -610,7 +619,7 @@ static int ogg_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
{
|
||||
struct ogg *ogg;
|
||||
struct ogg_stream *os;
|
||||
int idx = -1, ret;
|
||||
int idx, ret;
|
||||
int pstart, psize;
|
||||
int64_t fpos, pts, dts;
|
||||
|
||||
@ -669,7 +678,7 @@ static int64_t ogg_read_timestamp(AVFormatContext *s, int stream_index,
|
||||
AVIOContext *bc = s->pb;
|
||||
int64_t pts = AV_NOPTS_VALUE;
|
||||
int64_t keypos = -1;
|
||||
int i = -1;
|
||||
int i;
|
||||
int pstart, psize;
|
||||
avio_seek(bc, *pos_arg, SEEK_SET);
|
||||
ogg_reset(s);
|
||||
|
@ -494,8 +494,10 @@ static int swf_write_trailer(AVFormatContext *s)
|
||||
avio_wl32(pb, file_size);
|
||||
avio_seek(pb, swf->duration_pos, SEEK_SET);
|
||||
avio_wl16(pb, swf->video_frame_number);
|
||||
if (swf->vframes_pos) {
|
||||
avio_seek(pb, swf->vframes_pos, SEEK_SET);
|
||||
avio_wl16(pb, swf->video_frame_number);
|
||||
}
|
||||
avio_seek(pb, file_size, SEEK_SET);
|
||||
}
|
||||
return 0;
|
||||
|
@ -75,6 +75,7 @@ static av_always_inline av_const int16_t av_clip_int16_arm(int a)
|
||||
return x;
|
||||
}
|
||||
|
||||
#if !CONFIG_SMALL //the code below cannot be compiled without always_inline
|
||||
#define av_clip_uintp2 av_clip_uintp2_arm
|
||||
static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p)
|
||||
{
|
||||
@ -82,7 +83,7 @@ static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p)
|
||||
__asm__ ("usat %0, %2, %1" : "=r"(x) : "r"(a), "i"(p));
|
||||
return x;
|
||||
}
|
||||
|
||||
#endif //!CONFIG_SMALL
|
||||
|
||||
#else /* HAVE_ARMV6 */
|
||||
|
||||
|
@ -82,8 +82,8 @@ uninstall-libs::
|
||||
-$(RM) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR)" \
|
||||
"$(SHLIBDIR)/$(SLIBNAME)" \
|
||||
"$(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)"
|
||||
-$(RM) $(SLIB_INSTALL_EXTRA_SHLIB:%="$(SHLIBDIR)"%)
|
||||
-$(RM) $(SLIB_INSTALL_EXTRA_LIB:%="$(LIBDIR)"%)
|
||||
-$(RM) $(SLIB_INSTALL_EXTRA_SHLIB:%="$(SHLIBDIR)/%")
|
||||
-$(RM) $(SLIB_INSTALL_EXTRA_LIB:%="$(LIBDIR)/%")
|
||||
-$(RM) "$(LIBDIR)/$(LIBNAME)"
|
||||
|
||||
uninstall-headers::
|
||||
|
Reference in New Issue
Block a user