From: Michael Niedermayer Date: Sun, 25 Mar 2012 00:56:53 +0000 (+0100) Subject: Merge remote-tracking branch 'qatar/master' X-Git-Tag: n0.11~1147 X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/8bf95e8bd5c20eb940bd9583d3f947d8210eeb56 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 --- 8bf95e8bd5c20eb940bd9583d3f947d8210eeb56 diff --cc ffmpeg.c index db2066a,af73f08..098bab6 --- a/ffmpeg.c +++ b/ffmpeg.c @@@ -553,10 -501,7 +553,10 @@@ static int codec_get_buffer(AVCodecCont FrameBuffer *buf; int ret, i; + 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; @@@ -565,8 -510,7 +565,8 @@@ if (buf->w != s->width || buf->h != s->height || buf->pix_fmt != s->pix_fmt) { 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++; diff --cc libavcodec/utils.c index 58435d4,7d50bd5..9c662c2 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@@ -513,19 -475,14 +508,23 @@@ static int video_get_buffer(AVCodecCont } pic->extended_data = pic->data; avci->buffer_count++; + pic->width = buf->width; + pic->height = buf->height; + pic->format = buf->pix_fmt; + pic->sample_aspect_ratio = s->sample_aspect_ratio; - if(s->pkt) pic->pkt_pts= s->pkt->pts; - else pic->pkt_pts= AV_NOPTS_VALUE; + if (s->pkt) { + pic->pkt_pts = s->pkt->pts; + pic->pkt_pos = s->pkt->pos; + } else { + pic->pkt_pts = AV_NOPTS_VALUE; + pic->pkt_pos = -1; + } pic->reordered_opaque= s->reordered_opaque; + pic->sample_aspect_ratio = s->sample_aspect_ratio; + pic->width = s->width; + pic->height = s->height; + pic->format = s->pix_fmt; if(s->debug&FF_DEBUG_BUFFERS) av_log(s, AV_LOG_DEBUG, "default_get_buffer called on pic %p, %d "