diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-25 01:56:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-25 01:56:53 +0100 |
commit | 8bf95e8bd5c20eb940bd9583d3f947d8210eeb56 (patch) | |
tree | 43936a02f5da95392199e07b1ad38980e0ac2bc8 /ffmpeg.c | |
parent | f4c380a5e65c60422c6f62cab7bfe6155276d11d (diff) | |
parent | d5ed5e7d0c1fa46de348db0de4c82b0f621db3d4 (diff) | |
download | ffmpeg-8bf95e8bd5c20eb940bd9583d3f947d8210eeb56.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avc: Add a function for converting mp4 style extradata to annex b
pthread: free progress if buffer allocation failed.
lavc/avconv: support changing frame sizes in codecs with frame mt.
libavformat: Document who sets the AVStream.id field
utvideo: mark output picture as keyframe.
sunrast: Add support for negative linesize.
vp8: fix update_lf_deltas in libavcodec/vp8.c
ralf: read Huffman code lengths without GetBitContext
Conflicts:
ffmpeg.c
libavcodec/sunrastenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -476,7 +476,7 @@ static void reset_options(OptionsContext *o, int is_input) init_opts(); } -static int alloc_buffer(AVCodecContext *s, InputStream *ist, FrameBuffer **pbuf) +static int alloc_buffer(InputStream *ist, AVCodecContext *s, FrameBuffer **pbuf) { FrameBuffer *buf = av_mallocz(sizeof(*buf)); int i, ret; @@ -556,7 +556,7 @@ static int codec_get_buffer(AVCodecContext *s, AVFrame *frame) if(av_image_check_size(s->width, s->height, 0, s) || s->pix_fmt<0) return -1; - if (!ist->buffer_pool && (ret = alloc_buffer(s, ist, &ist->buffer_pool)) < 0) + if (!ist->buffer_pool && (ret = alloc_buffer(ist, s, &ist->buffer_pool)) < 0) return ret; buf = ist->buffer_pool; @@ -566,7 +566,7 @@ static int codec_get_buffer(AVCodecContext *s, AVFrame *frame) av_freep(&buf->base[0]); av_free(buf); ist->dr1 = 0; - if ((ret = alloc_buffer(s, ist, &buf)) < 0) + if ((ret = alloc_buffer(ist, s, &buf)) < 0) return ret; } buf->refcount++; @@ -575,6 +575,10 @@ static int codec_get_buffer(AVCodecContext *s, AVFrame *frame) frame->type = FF_BUFFER_TYPE_USER; frame->extended_data = frame->data; frame->pkt_pts = s->pkt ? s->pkt->pts : AV_NOPTS_VALUE; + frame->width = buf->w; + frame->height = buf->h; + frame->format = buf->pix_fmt; + frame->sample_aspect_ratio = s->sample_aspect_ratio; for (i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) { frame->base[i] = buf->base[i]; // XXX h264.c uses base though it shouldn't |