[FFmpeg-cvslog] Merge commit '89df3fd49e9992441f680326902b4912d79f514f'
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 16 12:34:47 2015 +0100| [a0aa3eaafc79cfd15452745ad9f54207f6461899] | committer: Michael Niedermayer Merge commit '89df3fd49e9992441f680326902b4912d79f514f' * commit '89df3fd49e9992441f680326902b4912d79f514f': swscale: fix warning about incompatible function pointer type Not merged, this change is incorrect for FFmpeg Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a0aa3eaafc79cfd15452745ad9f54207f6461899 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swscale: fix warning about incompatible function pointer type
ffmpeg | branch: master | Vittorio Giovara | Thu Jan 15 15:15:21 2015 +0100| [89df3fd49e9992441f680326902b4912d79f514f] | committer: Vittorio Giovara swscale: fix warning about incompatible function pointer type > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89df3fd49e9992441f680326902b4912d79f514f --- libswscale/input.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/input.c b/libswscale/input.c index 6acd2bb..f575b7b 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -596,7 +596,7 @@ static void planar_rgb_to_y(uint8_t *dst, const uint8_t *src[4], int width) } } -static void planar_rgb_to_a(uint8_t *_dst, const uint8_t *src[4], int width, int32_t *unused) +static void planar_rgb_to_a(uint8_t *_dst, const uint8_t *src[4], int width) { uint16_t *dst = (uint16_t *)_dst; int i; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] swscale: fix gbrap to gbrap alpha scaling
ffmpeg | branch: master | Vittorio Giovara | Thu Jan 15 15:15:22 2015 +0100| [2df7277711cbe3ca5415ff8e31228dcffa309211] | committer: Vittorio Giovara swscale: fix gbrap to gbrap alpha scaling > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2df7277711cbe3ca5415ff8e31228dcffa309211 --- libswscale/input.c |5 ++--- tests/ref/fate/filter-pixfmts-scale |2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libswscale/input.c b/libswscale/input.c index f575b7b..e806bce 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -596,12 +596,11 @@ static void planar_rgb_to_y(uint8_t *dst, const uint8_t *src[4], int width) } } -static void planar_rgb_to_a(uint8_t *_dst, const uint8_t *src[4], int width) +static void planar_rgb_to_a(uint8_t *dst, const uint8_t *src[4], int width) { -uint16_t *dst = (uint16_t *)_dst; int i; for (i = 0; i < width; i++) -dst[i] = src[3][i] << 6; +dst[i] = src[3][i]; } static void planar_rgb_to_uv(uint8_t *dstU, uint8_t *dstV, const uint8_t *src[4], int width) diff --git a/tests/ref/fate/filter-pixfmts-scale b/tests/ref/fate/filter-pixfmts-scale index 712754c..408644b 100644 --- a/tests/ref/fate/filter-pixfmts-scale +++ b/tests/ref/fate/filter-pixfmts-scale @@ -12,7 +12,7 @@ bgr565be922a2503767036ae9536f4f7823c04ee bgr565le3a514a298c6161a071ddf9963c06509d bgr87f007fa6c153a16e808a9c51605a4016 bgraa5e7040f9a80cccd65e5acf2ca09ace5 -gbrap 08ea11431bc436d788494d678b3edc6f +gbrap 7df4fd8da27245788cb422794e03acd4 gbrp205c50f8359cb4ba2827a7711dea2cc6 gbrp10be30b7f9d5ef5da474fb794743146236aa gbrp10le2e9949a01fe4c38774728e34795165cc ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '2df7277711cbe3ca5415ff8e31228dcffa309211'
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 16 13:10:04 2015 +0100| [aee51ee8b9b87b16bd1ecced9d984344f8d4d4ea] | committer: Michael Niedermayer Merge commit '2df7277711cbe3ca5415ff8e31228dcffa309211' * commit '2df7277711cbe3ca5415ff8e31228dcffa309211': swscale: fix gbrap to gbrap alpha scaling Conflicts: libswscale/input.c tests/ref/fate/filter-pixfmts-scale Not merged, the code works fine as is and does not work with this change Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aee51ee8b9b87b16bd1ecced9d984344f8d4d4ea --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '3941df546276b190cc9362fd093e6721e8e52f50'
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 16 14:20:12 2015 +0100| [2d0440f93f93d2f92947dabb481b3e56c099ea26] | committer: Michael Niedermayer Merge commit '3941df546276b190cc9362fd093e6721e8e52f50' * commit '3941df546276b190cc9362fd093e6721e8e52f50': aea: Return proper error code on invalid header Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2d0440f93f93d2f92947dabb481b3e56c099ea26 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] aea: Return proper error code on invalid header
ffmpeg | branch: master | Nidhi Makhijani | Thu Jan 15 18:38:03 2015 +0530| [3941df546276b190cc9362fd093e6721e8e52f50] | committer: Vittorio Giovara aea: Return proper error code on invalid header > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3941df546276b190cc9362fd093e6721e8e52f50 --- libavformat/aea.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/aea.c b/libavformat/aea.c index 7675009..c107109 100644 --- a/libavformat/aea.c +++ b/libavformat/aea.c @@ -73,7 +73,7 @@ static int aea_read_header(AVFormatContext *s) if (st->codec->channels != 1 && st->codec->channels != 2) { av_log(s,AV_LOG_ERROR,"Channels %d not supported!\n",st->codec->channels); -return -1; +return AVERROR_INVALIDDATA; } st->codec->channel_layout = (st->codec->channels == 1) ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffmpeg: Maintain higher precision pts between video filter and fps code
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 16 17:03:35 2015 +0100| [7b32856011d1859a974b884f76bd17b7a7fdab76] | committer: Michael Niedermayer ffmpeg: Maintain higher precision pts between video filter and fps code This is a bit ugly as it attempts to keep most of the computation in integers before the double based fps code. The use of integers is to reduce the chances of rounding differences between platforms Previously the timestamp was rounded to the encoder timebase before being converted back to double precision which could cause loss of precision Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b32856011d1859a974b884f76bd17b7a7fdab76 --- ffmpeg.c | 24 ++-- tests/ref/fate/filter-setpts | 10 +- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index 18d2768..909dd68 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -883,14 +883,15 @@ static void do_subtitle_out(AVFormatContext *s, static void do_video_out(AVFormatContext *s, OutputStream *ost, - AVFrame *next_picture) + AVFrame *next_picture, + double sync_ipts) { int ret, format_video_sync; AVPacket pkt; AVCodecContext *enc = ost->enc_ctx; AVCodecContext *mux_enc = ost->st->codec; int nb_frames, nb0_frames, i; -double sync_ipts, delta, delta0; +double delta, delta0; double duration = 0; int frame_size = 0; InputStream *ist = NULL; @@ -909,7 +910,6 @@ static void do_video_out(AVFormatContext *s, duration = lrintf(av_frame_get_pkt_duration(next_picture) * av_q2d(ist->st->time_base) / av_q2d(enc->time_base)); } -sync_ipts = next_picture->pts; delta0 = sync_ipts - ost->sync_opts; delta = delta0 + duration; @@ -1233,6 +1233,7 @@ static int reap_filters(void) filtered_frame = ost->filtered_frame; while (1) { +double float_pts = AV_NOPTS_VALUE; // this is identical to filtered_frame.pts but with higher precission ret = av_buffersink_get_frame_flags(filter, filtered_frame, AV_BUFFERSINK_FLAG_NO_REQUEST); if (ret < 0) { @@ -1246,9 +1247,19 @@ static int reap_filters(void) av_frame_unref(filtered_frame); continue; } - if (filtered_frame->pts != AV_NOPTS_VALUE) { int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time; +AVRational tb = enc->time_base; +int extra_bits = av_clip(29 - av_log2(tb.den), 0, 16); + +tb.den <<= extra_bits; +float_pts = +av_rescale_q(filtered_frame->pts, filter->inputs[0]->time_base, tb) - +av_rescale_q(start_time, AV_TIME_BASE_Q, tb); +float_pts /= 1 << extra_bits; +// avoid exact midoints to reduce the chance of rounding differences, this can be removed in case the fps code is changed to work with integers +float_pts += FFSIGN(float_pts) * 1.0 / (1<<17); + filtered_frame->pts = av_rescale_q(filtered_frame->pts, filter->inputs[0]->time_base, enc->time_base) - av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base); @@ -1262,12 +1273,13 @@ static int reap_filters(void) enc->sample_aspect_ratio = filtered_frame->sample_aspect_ratio; if (debug_ts) { -av_log(NULL, AV_LOG_INFO, "filter -> pts:%s pts_time:%s time_base:%d/%d\n", +av_log(NULL, AV_LOG_INFO, "filter -> pts:%s pts_time:%s exact:%f time_base:%d/%d\n", av_ts2str(filtered_frame->pts), av_ts2timestr(filtered_frame->pts, &enc->time_base), +float_pts, enc->time_base.num, enc->time_base.den); } -do_video_out(of->ctx, ost, filtered_frame); +do_video_out(of->ctx, ost, filtered_frame, float_pts); break; case AVMEDIA_TYPE_AUDIO: if (!(enc->codec->capabilities & CODEC_CAP_PARAM_CHANGE) && diff --git a/tests/ref/fate/filter-setpts b/tests/ref/fate/filter-setpts index c1ce1d3..5b1d734 100644 --- a/tests/ref/fate/filter-setpts +++ b/tests/ref/fate/filter-setpts @@ -7,27 +7,27 @@ 0, 5, 5,1, 152064, 0xedb5a8e6 0, 6, 6,1, 152064, 0x5ab58bac 0, 7, 7,1, 152064, 0x1f1b8026 -0, 8, 8,1, 152064, 0x02344760 +0, 8, 8,1, 152064, 0x91373915 0, 9, 9,1, 152064, 0x30f5fcd5 0, 10, 10,1, 152064, 0xc711ad61 0,
[FFmpeg-cvslog] ffmpeg: drop redundant frame_pts value
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 16 16:32:50 2015 +0100| [261e8ccbd1e38c0af719b97ed3fb1720bb733e09] | committer: Michael Niedermayer ffmpeg: drop redundant frame_pts value Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=261e8ccbd1e38c0af719b97ed3fb1720bb733e09 --- ffmpeg.c |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index 2a9fe43..18d2768 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1214,7 +1214,6 @@ static int reap_filters(void) { AVFrame *filtered_frame = NULL; int i; -int64_t frame_pts; /* Reap all buffers present in the buffer sinks */ for (i = 0; i < nb_output_streams; i++) { @@ -1247,10 +1246,10 @@ static int reap_filters(void) av_frame_unref(filtered_frame); continue; } -frame_pts = AV_NOPTS_VALUE; + if (filtered_frame->pts != AV_NOPTS_VALUE) { int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time; -filtered_frame->pts = frame_pts = +filtered_frame->pts = av_rescale_q(filtered_frame->pts, filter->inputs[0]->time_base, enc->time_base) - av_rescale_q(start_time, AV_TIME_BASE_Q, enc->time_base); } @@ -1259,7 +1258,6 @@ static int reap_filters(void) switch (filter->inputs[0]->type) { case AVMEDIA_TYPE_VIDEO: -filtered_frame->pts = frame_pts; if (!ost->frame_aspect_ratio.num) enc->sample_aspect_ratio = filtered_frame->sample_aspect_ratio; @@ -1272,7 +1270,6 @@ static int reap_filters(void) do_video_out(of->ctx, ost, filtered_frame); break; case AVMEDIA_TYPE_AUDIO: -filtered_frame->pts = frame_pts; if (!(enc->codec->capabilities & CODEC_CAP_PARAM_CHANGE) && enc->channels != av_frame_get_channels(filtered_frame)) { av_log(NULL, AV_LOG_ERROR, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffmpeg: Use filter graph output frame rate also for frame duration estimation
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 16 20:15:15 2015 +0100| [d3d9a00bcdfd5fc81d4640489555a3a41c82b303] | committer: Michael Niedermayer ffmpeg: Use filter graph output frame rate also for frame duration estimation Previously the duration was sometimes wrong, this addition limits the value and improves which frames are choosen when reducing the frame rate Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d3d9a00bcdfd5fc81d4640489555a3a41c82b303 --- ffmpeg.c |8 1 file changed, 8 insertions(+) diff --git a/ffmpeg.c b/ffmpeg.c index 909dd68..0a39274 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -895,6 +895,7 @@ static void do_video_out(AVFormatContext *s, double duration = 0; int frame_size = 0; InputStream *ist = NULL; +AVFilterContext *filter = ost->filter->filter; if (ost->source_index >= 0) ist = input_streams[ost->source_index]; @@ -902,6 +903,13 @@ static void do_video_out(AVFormatContext *s, if(ist && ist->st->start_time != AV_NOPTS_VALUE && ist->st->first_dts != AV_NOPTS_VALUE && ost->frame_rate.num) duration = 1/(av_q2d(ost->frame_rate) * av_q2d(enc->time_base)); +// We take the conservative approuch here and take the minimum even though +// this should be correct on its own but a value too small is harmless, one +// too big can lead to errors +if (filter->inputs[0]->frame_rate.num > 0 && +filter->inputs[0]->frame_rate.den > 0) +duration = FFMIN(duration, 1/(av_q2d(filter->inputs[0]->frame_rate) * av_q2d(enc->time_base))); + if (!ost->filters_script && !ost->filters && next_picture && ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_framepack: Check and update frame_rate
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 16 21:36:26 2015 +0100| [a46a23d30fea9c8a5570e07ec4d9c9b4eaa6eb4f] | committer: Michael Niedermayer avfilter/vf_framepack: Check and update frame_rate The frame_rate update was missing leaving the output frame rate wrong. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a46a23d30fea9c8a5570e07ec4d9c9b4eaa6eb4f --- libavfilter/vf_framepack.c | 13 - tests/ref/fate/filter-framepack-frameseq | 26 +- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c index 5087673..285381d 100644 --- a/libavfilter/vf_framepack.c +++ b/libavfilter/vf_framepack.c @@ -82,6 +82,7 @@ static int config_output(AVFilterLink *outlink) int width= ctx->inputs[LEFT]->w; int height = ctx->inputs[LEFT]->h; AVRational time_base = ctx->inputs[LEFT]->time_base; +AVRational frame_rate = ctx->inputs[LEFT]->frame_rate; // check size and fps match on the other input if (width != ctx->inputs[RIGHT]->w || @@ -93,11 +94,18 @@ static int config_output(AVFilterLink *outlink) return AVERROR_INVALIDDATA; } else if (av_cmp_q(time_base, ctx->inputs[RIGHT]->time_base) != 0) { av_log(ctx, AV_LOG_ERROR, - "Left and right framerates differ (%d/%d vs %d/%d).\n", + "Left and right time bases differ (%d/%d vs %d/%d).\n", time_base.num, time_base.den, ctx->inputs[RIGHT]->time_base.num, ctx->inputs[RIGHT]->time_base.den); return AVERROR_INVALIDDATA; +} else if (av_cmp_q(frame_rate, ctx->inputs[RIGHT]->frame_rate) != 0) { +av_log(ctx, AV_LOG_ERROR, + "Left and right framerates differ (%d/%d vs %d/%d).\n", + frame_rate.num, frame_rate.den, + ctx->inputs[RIGHT]->frame_rate.num, + ctx->inputs[RIGHT]->frame_rate.den); +return AVERROR_INVALIDDATA; } s->pix_desc = av_pix_fmt_desc_get(outlink->format); @@ -108,6 +116,8 @@ static int config_output(AVFilterLink *outlink) switch (s->format) { case AV_STEREO3D_FRAMESEQUENCE: time_base.den *= 2; +frame_rate.num *= 2; + s->double_pts = AV_NOPTS_VALUE; break; case AV_STEREO3D_COLUMNS: @@ -126,6 +136,7 @@ static int config_output(AVFilterLink *outlink) outlink->w = width; outlink->h = height; outlink->time_base = time_base; +outlink->frame_rate= frame_rate; return 0; } diff --git a/tests/ref/fate/filter-framepack-frameseq b/tests/ref/fate/filter-framepack-frameseq index c3d2a15..83c08a0 100644 --- a/tests/ref/fate/filter-framepack-frameseq +++ b/tests/ref/fate/filter-framepack-frameseq @@ -1,16 +1,16 @@ -#tb 0: 1/25 +#tb 0: 1/50 0, 0, 0,1, 152064, 0x05b789ef 0, 1, 1,1, 152064, 0x05b789ef 0, 2, 2,1, 152064, 0x4bb46551 -0, 3, 3,1, 152064, 0x9dddf64a -0, 4, 4,1, 152064, 0x2a8380b0 -0, 5, 5,1, 152064, 0x4de3b652 -0, 6, 6,1, 152064, 0xedb5a8e6 -0, 7, 7,1, 152064, 0xe20f7c23 -0, 8, 8,1, 152064, 0x5ab58bac -0, 9, 9,1, 152064, 0x1f1b8026 -0, 10, 10,1, 152064, 0x91373915 -0, 11, 11,1, 152064, 0x02344760 -0, 12, 12,1, 152064, 0x30f5fcd5 -0, 13, 13,1, 152064, 0xc711ad61 -0, 14, 14,1, 152064, 0x24eca223 +0, 3, 3,1, 152064, 0x4bb46551 +0, 4, 4,1, 152064, 0x9dddf64a +0, 5, 5,1, 152064, 0x9dddf64a +0, 6, 6,1, 152064, 0x2a8380b0 +0, 7, 7,1, 152064, 0x2a8380b0 +0, 8, 8,1, 152064, 0x4de3b652 +0, 9, 9,1, 152064, 0x4de3b652 +0, 10, 10,1, 152064, 0xedb5a8e6 +0, 11, 11,1, 152064, 0xedb5a8e6 +0, 12, 12,1, 152064, 0xe20f7c23 +0, 13, 13,1, 152064, 0xe20f7c23 +0, 14, 14,1, 152064, 0x5ab58bac ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Fix precission typos
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 16 22:42:42 2015 +0100| [f96148913b310c16302eb9a50f480d6e46fc04e5] | committer: Michael Niedermayer Fix precission typos Found-by: ubitux Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f96148913b310c16302eb9a50f480d6e46fc04e5 --- ffmpeg.c |2 +- libavcodec/mpegvideo_enc.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ffmpeg.c b/ffmpeg.c index 0a39274..2501e2c 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1241,7 +1241,7 @@ static int reap_filters(void) filtered_frame = ost->filtered_frame; while (1) { -double float_pts = AV_NOPTS_VALUE; // this is identical to filtered_frame.pts but with higher precission +double float_pts = AV_NOPTS_VALUE; // this is identical to filtered_frame.pts but with higher precision ret = av_buffersink_get_frame_flags(filter, filtered_frame, AV_BUFFERSINK_FLAG_NO_REQUEST); if (ret < 0) { diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 1a62ef1..d03b57e 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -342,7 +342,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) s->rtp_mode = !!avctx->rtp_payload_size; s->intra_dc_precision = avctx->intra_dc_precision; -// workaround some differences between how applications specify dc precission +// workaround some differences between how applications specify dc precision if (s->intra_dc_precision < 0) { s->intra_dc_precision += 8; } else if (s->intra_dc_precision >= 8) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/flac_parser: print error messages in case of errors
ffmpeg | branch: master | Michael Niedermayer | Sat Jan 17 01:40:39 2015 +0100| [040e5703e6b8d1d10e389ee5ecd91711c61b8378] | committer: Michael Niedermayer avcodec/flac_parser: print error messages in case of errors Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=040e5703e6b8d1d10e389ee5ecd91711c61b8378 --- libavcodec/flac_parser.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index d16af29..ed0da55 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -194,6 +194,8 @@ static int find_headers_search_validate(FLACParseContext *fpc, int offset) FLAC_MAX_SEQUENTIAL_HEADERS); if (!(*end_handle)->link_penalty) { av_freep(end_handle); +av_log(fpc->avctx, AV_LOG_ERROR, + "couldn't allocate link_penalty\n"); return AVERROR(ENOMEM); } @@ -712,8 +714,11 @@ static av_cold int flac_parse_init(AVCodecParserContext *c) /* There will generally be FLAC_MIN_HEADERS buffered in the fifo before it drains. This is allocated early to avoid slow reallocation. */ fpc->fifo_buf = av_fifo_alloc_array(FLAC_MIN_HEADERS + 3, FLAC_AVG_FRAME_SIZE); -if (!fpc->fifo_buf) +if (!fpc->fifo_buf) { +av_log(fpc->avctx, AV_LOG_ERROR, +"couldn't allocate fifo_buf\n"); return AVERROR(ENOMEM); +} return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/flac_parser: fix handling EOF if no headers are found
ffmpeg | branch: master | Michael Niedermayer | Sat Jan 17 01:56:03 2015 +0100| [c4d85fc23c100f7a27d9bad710eb153214868e27] | committer: Michael Niedermayer avcodec/flac_parser: fix handling EOF if no headers are found Fixes assertion failure Fixes Ticket4269 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c4d85fc23c100f7a27d9bad710eb153214868e27 --- libavcodec/flac_parser.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index ed0da55..12e09bb 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -704,7 +704,7 @@ static int flac_parse(AVCodecParserContext *s, AVCodecContext *avctx, handle_error: *poutbuf = NULL; *poutbuf_size = 0; -return read_end - buf; +return buf_size ? read_end - buf : 0; } static av_cold int flac_parse_init(AVCodecParserContext *c) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog