[FFmpeg-cvslog] Merge commit '6ca11f7157d0ffd11ea9a4211b04981b46dc75d6'
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 25 12:09:29 2014 +0200| [f1b04f803eafa17dbfa19977b1a76f412183478e] | committer: Michael Niedermayer Merge commit '6ca11f7157d0ffd11ea9a4211b04981b46dc75d6' * commit '6ca11f7157d0ffd11ea9a4211b04981b46dc75d6': doc/APIchanges: fill in missing hashes and dates Conflicts: doc/APIchanges Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f1b04f803eafa17dbfa19977b1a76f412183478e --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/APIchanges: fill in missing hashes and dates
ffmpeg | branch: master | Anton Khirnov | Sun May 18 10:52:41 2014 +0200| [6ca11f7157d0ffd11ea9a4211b04981b46dc75d6] | committer: Anton Khirnov doc/APIchanges: fill in missing hashes and dates > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6ca11f7157d0ffd11ea9a4211b04981b46dc75d6 --- doc/APIchanges | 58 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 6d1f061..14ec297 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,107 +13,107 @@ libavutil: 2014-08-09 API changes, most recent first: -2014-08-xx - xxx - lavu 54.03.0 - mem.h +2014-08-13 - 8ddc326 - lavu 54.03.0 - mem.h Add av_strndup(). -2014-xx-xx - xxx - lavu 54.02.0 - opt.h +2014-08-13 - a8c104a - lavu 54.02.0 - opt.h Add av_opt_get_dict_val/set_dict_val with AV_OPT_TYPE_DICT to support dictionary types being set as options. -2014-xx-xx - xxx - lavf 56.01.0 - avformat.h +2014-08-13 - afbd4b8 - lavf 56.01.0 - avformat.h Add AVFormatContext.event_flags and AVStream.event_flags for signaling to the user when events happen in the file/stream. -2014-04-xx - xxx - lavr 2.1.0 - avresample.h +2014-08-10 - fb1ddcd - lavr 2.1.0 - avresample.h Add avresample_convert_frame() and avresample_config(). -2014-04-xx - xxx - lavu 54.1.0 - error.h +2014-08-10 - fb1ddcd - lavu 54.1.0 - error.h Add AVERROR_INPUT_CHANGED and AVERROR_OUTPUT_CHANGED. -2014-08-xx - xxx - lavc 55.57.4 - avcodec.h +2014-08-08 - d35b94f - lavc 55.57.4 - avcodec.h Deprecate FF_IDCT_XVIDMMX define and xvidmmx idct option. Replaced by FF_IDCT_XVID and xvid respectively. -2014-08-xx - xxx - lsws 2.1.3 - swscale.h +2014-08-07 - bb78903 - lsws 2.1.3 - swscale.h sws_getCachedContext is not going to be removed in the future. -2014-08-xx - xxx - lavc 55.57.3 - avcodec.h +2014-08-07 - ad1ee5f - lavc 55.57.3 - avcodec.h reordered_opaque is not going to be removed in the future. -2014-08-xx - xxx - lavu 53.22.0 - pixfmt.h +2014-08-04 - e9abafc - lavu 53.22.0 - pixfmt.h Add AV_PIX_FMT_YA16 pixel format for 16 bit packed gray with alpha. -2014-08-xx - xxx - lavu 53.21.1 - avstring.h +2014-08-04 - e96c3b8 - lavu 53.21.1 - avstring.h Rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8 to better identify the format. An alias pixel format and color space name are provided for compatibility. -2014-08-xx - xxx - lavu 53.21.0 - pixdesc.h +2014-08-04 - d2962e9 - lavu 53.21.0 - pixdesc.h Support name aliases for pixel formats. -2014-08-xx - xxx - lavc 55.57.2 - avcodec.h -2014-08-xx - xxx - lavu 53.20.0 - frame.h +2014-08-03 - 1ef9e83 - lavc 55.57.2 - avcodec.h +2014-08-03 - 1ef9e83 - lavu 53.20.0 - frame.h Deprecate AVCodecContext.dtg_active_format and use side-data instead. -2014-08-xx - xxx - lavc 55.57.1 - avcodec.h +2014-08-03 - 9f17685 - lavc 55.57.1 - avcodec.h Deprecate unused FF_IDCT_IPP define and ipp avcodec option. Deprecate unused FF_DEBUG_PTS define and pts avcodec option. Deprecate unused FF_CODER_TYPE_DEFLATE define and deflate avcodec option. Deprecate unused FF_DCT_INT define and int avcodec option. Deprecate unused avcodec option scenechange_factor. -2014-07-xx - xxx - lavu 53.19.0 - avstring.h +2014-07-29 - 69e7336 - lavu 53.19.0 - avstring.h Make name matching function from lavf public as av_match_name(). -2014-xx-xx - xxx - lavc 55.57.0 - avcodec.h +2014-07-28 - c5fca01 - lavc 55.57.0 - avcodec.h Add AV_CODEC_PROP_REORDER to mark codecs supporting frame reordering. -2014-07-xx - xxx - lavu 53.18.0 - display.h +2014-07-09 - a54f03b - lavu 53.18.0 - display.h Add av_display_matrix_flip() to flip the transformation matrix. -2014-07-xx - xxx - lavc 55.56.0 - dv_profile.h +2014-07-09 - f6ee61f - lavc 55.56.0 - dv_profile.h Add a public API for DV profile handling. -2014-06-xx - xxx - lavu 53.17.0 - imgutils.h +2014-06-20 - 9e500ef - lavu 53.17.0 - imgutils.h Add av_image_check_sar(). -2014-06-xx - xxx - lavc 55.55.0 - avcodec.h +2014-06-20 - 874390e - lavc 55.55.0 - avcodec.h Add av_packet_rescale_ts() to simplify timestamp conversion. -2014-xx-xx - xxx - lavf 55.20.0 - avformat.h +2014-06-18 - 194be1f - lavf 55.20.0 - avformat.h The proper way for providing a hint about the desired timebase to the muxers is now setting AVStream.time_base, instead of AVStream.codec.time_base as was done previously. The old method is now deprecated. -2014-04-xx - xxx - lavc 55.54.0 - avcodec.h +2014-06-01 - 0957b27 - lavc 55.54.0 - avcodec.h Add AVCodecContext.side_data_only_packets to allow encoders to output packets with only side data. This option may become mandatory in the future, so all users are recommended to update their code and enable this option. -2014-xx-xx - xxx - lavu 53.16.0 - frame.h, pixfmt.h +2014-06-01 - 8c02adc - lavu 53.16.0 - frame.h,
[FFmpeg-cvslog] Merge commit 'b263f8ffe7599d9cd27ec477a12700da8eb2790d'
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 25 12:27:19 2014 +0200| [215db2935b06c0e936dadce012a31de7da25ba97] | committer: Michael Niedermayer Merge commit 'b263f8ffe7599d9cd27ec477a12700da8eb2790d' * commit 'b263f8ffe7599d9cd27ec477a12700da8eb2790d': lavf: add AVFormatContext.max_ts_probe Conflicts: doc/APIchanges libavformat/avformat.h libavformat/utils.c libavformat/version.h lavf-fate/mp3 changes as the estimated input bitrate changes and that is copied to the output Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=215db2935b06c0e936dadce012a31de7da25ba97 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf: add AVFormatContext.max_ts_probe
ffmpeg | branch: master | Anton Khirnov | Tue Aug 19 17:49:58 2014 +| [b263f8ffe7599d9cd27ec477a12700da8eb2790d] | committer: Anton Khirnov lavf: add AVFormatContext.max_ts_probe It allows to configure how long will avformat_find_stream_info() wait to get the first timestamp. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b263f8ffe7599d9cd27ec477a12700da8eb2790d --- doc/APIchanges |3 +++ libavformat/avformat.h |6 ++ libavformat/options_table.h |1 + libavformat/utils.c |1 + libavformat/version.h |2 +- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 14ec297..0ea02ff 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2014-08-09 API changes, most recent first: +2014-08-xx - xxx - lavf 56.03.0 - avformat.h + Add AVFormatContext.max_ts_probe. + 2014-08-13 - 8ddc326 - lavu 54.03.0 - mem.h Add av_strndup(). diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 5b29145..923b282 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1192,6 +1192,12 @@ typedef struct AVFormatContext { int event_flags; #define AVFMT_EVENT_FLAG_METADATA_UPDATED 0x0001 ///< The call resulted in updated metadata. +/** + * Maximum number of packets to read while waiting for the first timestamp. + * Decoding only. + */ +int max_ts_probe; + /* * All fields below this line are not part of the public API. They * may not be used outside of libavformat and can be changed and diff --git a/libavformat/options_table.h b/libavformat/options_table.h index ac052c8..0f7207c 100644 --- a/libavformat/options_table.h +++ b/libavformat/options_table.h @@ -65,6 +65,7 @@ static const AVOption avformat_options[] = { {"strict", "strictly conform to all the things in the spec no matter what the consequences", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_STRICT }, INT_MIN, INT_MAX, D|E, "strict"}, {"normal", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_NORMAL }, INT_MIN, INT_MAX, D|E, "strict"}, {"experimental", "allow non-standardized experimental variants", 0, AV_OPT_TYPE_CONST, {.i64 = FF_COMPLIANCE_EXPERIMENTAL }, INT_MIN, INT_MAX, D|E, "strict"}, +{"max_ts_probe", "maximum number of packets to read while waiting for the first timestamp", OFFSET(max_ts_probe), AV_OPT_TYPE_INT, { .i64 = 50 }, 0, INT_MAX, D }, {NULL}, }; diff --git a/libavformat/utils.c b/libavformat/utils.c index 4cc246d..faad9c9 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2108,6 +2108,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options) !st->codec->extradata) break; if (st->first_dts == AV_NOPTS_VALUE && +st->codec_info_nb_frames < ic->max_ts_probe && (st->codec->codec_type == AVMEDIA_TYPE_VIDEO || st->codec->codec_type == AVMEDIA_TYPE_AUDIO)) break; diff --git a/libavformat/version.h b/libavformat/version.h index 7b1acd6..d4dee72 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFORMAT_VERSION_MAJOR 56 -#define LIBAVFORMAT_VERSION_MINOR 2 +#define LIBAVFORMAT_VERSION_MINOR 3 #define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f'
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 25 13:26:42 2014 +0200| [08a110ca871e82630d5f6f834922014cd375f524] | committer: Michael Niedermayer Merge commit '6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f' * commit '6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f': libavformat: use MSG_NOSIGNAL when applicable Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=08a110ca871e82630d5f6f834922014cd375f524 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavformat: use MSG_NOSIGNAL when applicable
ffmpeg | branch: master | Rémi Denis-Courmont | Wed Aug 20 23:06:07 2014 +0300| [6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f] | committer: Martin Storsjö libavformat: use MSG_NOSIGNAL when applicable If the remote end of a connection oriented socket hangs up, generating an EPIPE error is preferable over an unhandled SIGPIPE signal. Signed-off-by: Martin Storsjö > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6ee1cb5740e7490151db7dcec7e20ceaf8a2fe1f --- libavformat/network.h |4 libavformat/sctp.c|4 ++-- libavformat/tcp.c |2 +- libavformat/unix.c|2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libavformat/network.h b/libavformat/network.h index 9d8c92f..09cee58 100644 --- a/libavformat/network.h +++ b/libavformat/network.h @@ -98,6 +98,10 @@ struct sockaddr_storage { }; #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */ +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#endif + #if !HAVE_STRUCT_ADDRINFO struct addrinfo { int ai_flags; diff --git a/libavformat/sctp.c b/libavformat/sctp.c index 66b31cc..84a4ac1 100644 --- a/libavformat/sctp.c +++ b/libavformat/sctp.c @@ -143,7 +143,7 @@ static int ff_sctp_send(int s, const void *msg, size_t len, memcpy(CMSG_DATA(cmsg), sinfo, sizeof(struct sctp_sndrcvinfo)); } -return sendmsg(s, &outmsg, flags); +return sendmsg(s, &outmsg, flags | MSG_NOSIGNAL); } typedef struct SCTPContext { @@ -300,7 +300,7 @@ static int sctp_write(URLContext *h, const uint8_t *buf, int size) abort(); ret = ff_sctp_send(s->fd, buf + 2, size - 2, &info, MSG_EOR); } else -ret = send(s->fd, buf, size, 0); +ret = send(s->fd, buf, size, MSG_NOSIGNAL); return ret < 0 ? ff_neterrno() : ret; } diff --git a/libavformat/tcp.c b/libavformat/tcp.c index cbd5142..27a0184 100644 --- a/libavformat/tcp.c +++ b/libavformat/tcp.c @@ -154,7 +154,7 @@ static int tcp_write(URLContext *h, const uint8_t *buf, int size) if (ret < 0) return ret; } -ret = send(s->fd, buf, size, 0); +ret = send(s->fd, buf, size, MSG_NOSIGNAL); return ret < 0 ? ff_neterrno() : ret; } diff --git a/libavformat/unix.c b/libavformat/unix.c index ab57c68..5c6f576 100644 --- a/libavformat/unix.c +++ b/libavformat/unix.c @@ -124,7 +124,7 @@ static int unix_write(URLContext *h, const uint8_t *buf, int size) if (ret < 0) return ret; } -ret = send(s->fd, buf, size, 0); +ret = send(s->fd, buf, size, MSG_NOSIGNAL); return ret < 0 ? ff_neterrno() : ret; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpegvideo_parser: consider vbv_delay in bitrate heuristic also for mpeg2
ffmpeg | branch: master | Michael Niedermayer | Wed Aug 20 20:01:40 2014 +0200| [d647ef0c8069876e53f9ce630890f1fb09986247] | committer: Michael Niedermayer avcodec/mpegvideo_parser: consider vbv_delay in bitrate heuristic also for mpeg2 Fixes bitrate detection in CBR mpeg2 Fixes ticket3678 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d647ef0c8069876e53f9ce630890f1fb09986247 --- libavcodec/mpegvideo_parser.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index 7aa3660..44bf26d 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -145,8 +145,9 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, the_end: ; if (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO && bit_rate) { avctx->rc_max_rate = 400*bit_rate; -} else if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && bit_rate && - (bit_rate != 0x3 || vbv_delay != 0x)) { +} +if (bit_rate && +((avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && bit_rate != 0x3) || vbv_delay != 0x)) { avctx->bit_rate = 400*bit_rate; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/APIchanges: fill in dates and hashes
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 25 15:57:37 2014 +0200| [beaf86bd02e47a8460fb6c6fd920ac8569c44fe4] | committer: Michael Niedermayer doc/APIchanges: fill in dates and hashes Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=beaf86bd02e47a8460fb6c6fd920ac8569c44fe4 --- doc/APIchanges | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 58be3cb..a414b41 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,10 +15,10 @@ libavutil: 2014-08-09 API changes, most recent first: -2014-08-xx - xxx - lavf 56.03.0 - avformat.h +2014-08-25 - 215db29 / b263f8f - lavf 56.3.100 / 56.3.0 - avformat.h Add AVFormatContext.max_ts_probe. -2014-08-23 - xxx - lavu 54.7.100 - dict.h +2014-08-23 - 8fc9bd0 - lavu 54.7.100 - dict.h AV_DICT_DONT_STRDUP_KEY and AV_DICT_DONT_STRDUP_VAL arguments are now freed even on error. This is consistent with the behaviour all users of it we could find expect. @@ -26,16 +26,16 @@ API changes, most recent first: 2014-08-21 - 980a5b0 - lavu 54.6.100 - frame.h motion_vector.h Add AV_FRAME_DATA_MOTION_VECTORS side data and AVMotionVector structure -2014-08-16 - xxx - lswr 1.1.100 - swresample.h +2014-08-16 - b7d5e01 - lswr 1.1.100 - swresample.h Add AVFrame based API -2014-xx-xx - xxx - lavu 54.4.100 - dict.h +2014-08-16 - c2829dc - lavu 54.4.100 - dict.h Add av_dict_set_int helper function. -2014-08-13 - 8ddc326 - lavu 54.03.0 - mem.h +2014-08-13 - c8571c6 / 8ddc326 - lavu 54.3.100 / 54.3.0 - mem.h Add av_strndup(). -2014-08-13 - a8c104a - lavu 54.02.0 - opt.h +2014-08-13 - 2ba4577 / a8c104a - lavu 54.2.100 / 54.2.0 - opt.h Add av_opt_get_dict_val/set_dict_val with AV_OPT_TYPE_DICT to support dictionary types being set as options. @@ -43,46 +43,46 @@ API changes, most recent first: Add AVFormatContext.event_flags and AVStream.event_flags for signaling to the user when events happen in the file/stream. -2014-08-10 - fb1ddcd - lavr 2.1.0 - avresample.h +2014-08-10 - 78eaaa8 / fb1ddcd - lavr 2.1.0 - avresample.h Add avresample_convert_frame() and avresample_config(). -2014-08-10 - fb1ddcd - lavu 54.1.0 - error.h +2014-08-10 - 78eaaa8 / fb1ddcd - lavu 54.1.100 / 54.1.0 - error.h Add AVERROR_INPUT_CHANGED and AVERROR_OUTPUT_CHANGED. -2014-08-08 - d35b94f - lavc 55.57.4 - avcodec.h +2014-08-08 - 3841f2a / d35b94f - lavc 55.73.102 / 55.57.4 - avcodec.h Deprecate FF_IDCT_XVIDMMX define and xvidmmx idct option. Replaced by FF_IDCT_XVID and xvid respectively. -2014-08-xx - xxx - lavf 55.53.100 - avio.h +2014-08-08 - 5c3c671 - lavf 55.53.100 - avio.h Add avio_feof() and deprecate url_feof(). 2014-08-07 - bb78903 - lsws 2.1.3 - swscale.h sws_getContext is not going to be removed in the future. -2014-08-07 - ad1ee5f - lavc 55.57.3 - avcodec.h +2014-08-07 - a561662 / ad1ee5f - lavc 55.73.101 / 55.57.3 - avcodec.h reordered_opaque is not going to be removed in the future. 2014-08-02 - 28a2107 - lavu 52.98.100 - pixelutils.h Add pixelutils API with SAD functions -2014-08-04 - e9abafc - lavu 53.22.0 - pixfmt.h +2014-08-04 - 6017c98 / e9abafc - lavu 52.97.100 / 53.22.0 - pixfmt.h Add AV_PIX_FMT_YA16 pixel format for 16 bit packed gray with alpha. -2014-08-04 - e96c3b8 - lavu 53.21.1 - avstring.h +2014-08-04 - 4c8bc6f / e96c3b8 - lavu 52.96.101 / 53.21.1 - avstring.h Rename AV_PIX_FMT_Y400A to AV_PIX_FMT_YA8 to better identify the format. An alias pixel format and color space name are provided for compatibility. -2014-08-04 - d2962e9 - lavu 53.21.0 - pixdesc.h +2014-08-04 - 073c074 / d2962e9 - lavu 52.96.100 / 53.21.0 - pixdesc.h Support name aliases for pixel formats. -2014-08-03 - 1ef9e83 - lavc 55.72.101 / 55.57.2 - avcodec.h -2014-08-03 - 1ef9e83 - lavu 52.95.100 / 53.20.0 - frame.h +2014-08-03 - 71d008e / 1ef9e83 - lavc 55.72.101 / 55.57.2 - avcodec.h +2014-08-03 - 71d008e / 1ef9e83 - lavu 52.95.100 / 53.20.0 - frame.h Deprecate AVCodecContext.dtg_active_format and use side-data instead. -2014-08-03 - xxx - lavc 55.72.100 - avcodec.h +2014-08-03 - e680c73 - lavc 55.72.100 - avcodec.h Add get_pixels() to AVDCT -2014-08-03 - 9f17685 - lavc 55.57.1 - avcodec.h +2014-08-03 - 9400603 / 9f17685 - lavc 55.71.101 / 55.57.1 - avcodec.h Deprecate unused FF_IDCT_IPP define and ipp avcodec option. Deprecate unused FF_DEBUG_PTS define and pts avcodec option. Deprecate unused FF_CODER_TYPE_DEFLATE define and deflate avcodec option. @@ -173,7 +173,7 @@ API changes, most recent first: Add AV_FRAME_DATA_DISPLAYMATRIX for exporting frame-level spatial rendering on video frames for proper display. -2014-05-19 - bddd8cb - lavc 55.64.100 / 55.53.0 - avcodec.h +2014-05-19 - ef1d4ee / bddd8cb - lavc 55.64.100 / 55.53.0 - avcodec.h Add AV_PKT_DATA_DISPLAYMATRIX for exporting packet-level spatia
[FFmpeg-cvslog] avcodec/vorbisenc: use av_malloc(z)_array()
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 25 16:03:54 2014 +0200| [52fca28c3bf5914d6d306906e4bccc2115b44ab1] | committer: Michael Niedermayer avcodec/vorbisenc: use av_malloc(z)_array() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52fca28c3bf5914d6d306906e4bccc2115b44ab1 --- libavcodec/vorbisenc.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c index fa6bccc..0fb7190 100644 --- a/libavcodec/vorbisenc.c +++ b/libavcodec/vorbisenc.c @@ -170,8 +170,8 @@ static int ready_codebook(vorbis_enc_codebook *cb) cb->pow2 = cb->dimensions = NULL; } else { int vals = cb_lookup_vals(cb->lookup, cb->ndimensions, cb->nentries); -cb->dimensions = av_malloc(sizeof(float) * cb->nentries * cb->ndimensions); -cb->pow2 = av_mallocz(sizeof(float) * cb->nentries); +cb->dimensions = av_malloc_array(cb->nentries, sizeof(float) * cb->ndimensions); +cb->pow2 = av_mallocz_array(cb->nentries, sizeof(float)); if (!cb->dimensions || !cb->pow2) return AVERROR(ENOMEM); for (i = 0; i < cb->nentries; i++) { @@ -201,7 +201,7 @@ static int ready_residue(vorbis_enc_residue *rc, vorbis_enc_context *venc) { int i; av_assert0(rc->type == 2); -rc->maxes = av_mallocz(sizeof(float[2]) * rc->classifications); +rc->maxes = av_mallocz_array(rc->classifications, sizeof(float[2])); if (!rc->maxes) return AVERROR(ENOMEM); for (i = 0; i < rc->classifications; i++) { @@ -266,8 +266,8 @@ static int create_vorbis_context(vorbis_enc_context *venc, cb->lookup = cvectors[book].lookup; cb->seq_p = 0; -cb->lens = av_malloc(sizeof(uint8_t) * cb->nentries); -cb->codewords = av_malloc(sizeof(uint32_t) * cb->nentries); +cb->lens = av_malloc_array(cb->nentries, sizeof(uint8_t)); +cb->codewords = av_malloc_array(cb->nentries, sizeof(uint32_t)); if (!cb->lens || !cb->codewords) return AVERROR(ENOMEM); memcpy(cb->lens, cvectors[book].clens, cvectors[book].len); @@ -275,7 +275,7 @@ static int create_vorbis_context(vorbis_enc_context *venc, if (cb->lookup) { vals = cb_lookup_vals(cb->lookup, cb->ndimensions, cb->nentries); -cb->quantlist = av_malloc(sizeof(int) * vals); +cb->quantlist = av_malloc_array(vals, sizeof(int)); if (!cb->quantlist) return AVERROR(ENOMEM); for (i = 0; i < vals; i++) @@ -305,7 +305,7 @@ static int create_vorbis_context(vorbis_enc_context *venc, fc->nclasses = FFMAX(fc->nclasses, fc->partition_to_class[i]); } fc->nclasses++; -fc->classes = av_malloc(sizeof(vorbis_enc_floor_class) * fc->nclasses); +fc->classes = av_malloc_array(fc->nclasses, sizeof(vorbis_enc_floor_class)); if (!fc->classes) return AVERROR(ENOMEM); for (i = 0; i < fc->nclasses; i++) { @@ -315,7 +315,7 @@ static int create_vorbis_context(vorbis_enc_context *venc, c->subclass = floor_classes[i].subclass; c->masterbook = floor_classes[i].masterbook; books = (1 << c->subclass); -c->books = av_malloc(sizeof(int) * books); +c->books = av_malloc_array(books, sizeof(int)); if (!c->books) return AVERROR(ENOMEM); for (j = 0; j < books; j++) @@ -328,7 +328,7 @@ static int create_vorbis_context(vorbis_enc_context *venc, for (i = 0; i < fc->partitions; i++) fc->values += fc->classes[fc->partition_to_class[i]].dim; -fc->list = av_malloc(sizeof(vorbis_floor1_entry) * fc->values); +fc->list = av_malloc_array(fc->values, sizeof(vorbis_floor1_entry)); if (!fc->list) return AVERROR(ENOMEM); fc->list[0].x = 0; @@ -419,10 +419,10 @@ static int create_vorbis_context(vorbis_enc_context *venc, venc->modes[0].mapping = 0; venc->have_saved = 0; -venc->saved = av_malloc(sizeof(float) * venc->channels * (1 << venc->log2_blocksize[1]) / 2); -venc->samples= av_malloc(sizeof(float) * venc->channels * (1 << venc->log2_blocksize[1])); -venc->floor = av_malloc(sizeof(float) * venc->channels * (1 << venc->log2_blocksize[1]) / 2); -venc->coeffs = av_malloc(sizeof(float) * venc->channels * (1 << venc->log2_blocksize[1]) / 2); +venc->saved = av_malloc_array(sizeof(float) * venc->channels, (1 << venc->log2_blocksize[1]) / 2); +venc->samples= av_malloc_array(sizeof(float) * venc->channels, (1 << venc->log2_blocksize[1])); +venc->floor = av_malloc_array(sizeof(float) * venc->channels, (1 << venc->log2_blocksize[1]) / 2); +venc->coeffs = av_malloc_array(sizeof(float) * venc->channels, (1 << venc->log2_blocksize[1]) / 2); if (!venc->saved || !venc->samples || !venc->flo
[FFmpeg-cvslog] avutil/opencl: use av_malloc(z)_array()
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 25 16:06:10 2014 +0200| [bb29896793bfa1f23066b0d3fb5353ecd741ce0c] | committer: Michael Niedermayer avutil/opencl: use av_malloc(z)_array() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bb29896793bfa1f23066b0d3fb5353ecd741ce0c --- libavutil/opencl.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavutil/opencl.c b/libavutil/opencl.c index a92bce7..0b4f83b 100644 --- a/libavutil/opencl.c +++ b/libavutil/opencl.c @@ -213,7 +213,7 @@ static int get_device_list(AVOpenCLDeviceList *device_list) "Could not get OpenCL platform ids: %s\n", av_opencl_errstr(status)); return AVERROR_EXTERNAL; } -platform_ids = av_mallocz(device_list->platform_num * sizeof(cl_platform_id)); +platform_ids = av_mallocz_array(device_list->platform_num, sizeof(cl_platform_id)); if (!platform_ids) return AVERROR(ENOMEM); status = clGetPlatformIDs(device_list->platform_num, platform_ids, NULL); @@ -223,7 +223,7 @@ static int get_device_list(AVOpenCLDeviceList *device_list) ret = AVERROR_EXTERNAL; goto end; } -device_list->platform_node = av_mallocz(device_list->platform_num * sizeof(AVOpenCLPlatformNode *)); +device_list->platform_node = av_mallocz_array(device_list->platform_num, sizeof(AVOpenCLPlatformNode *)); if (!device_list->platform_node) { ret = AVERROR(ENOMEM); goto end; @@ -249,14 +249,14 @@ static int get_device_list(AVOpenCLDeviceList *device_list) device_type[j], 0, NULL, &devices_num[j]); total_devices_num += devices_num[j]; } -device_list->platform_node[i]->device_node = av_mallocz(total_devices_num * sizeof(AVOpenCLDeviceNode *)); +device_list->platform_node[i]->device_node = av_mallocz_array(total_devices_num, sizeof(AVOpenCLDeviceNode *)); if (!device_list->platform_node[i]->device_node) { ret = AVERROR(ENOMEM); goto end; } for (j = 0; j < FF_ARRAY_ELEMS(device_type); j++) { if (devices_num[j]) { -device_ids = av_mallocz(devices_num[j] * sizeof(cl_device_id)); +device_ids = av_mallocz_array(devices_num[j], sizeof(cl_device_id)); if (!device_ids) { ret = AVERROR(ENOMEM); goto end; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/matroskadec: Ensure cues_end is initialized
ffmpeg | branch: master | Vignesh Venkatasubramanian | Mon Aug 25 09:15:13 2014 -0700| [080acf7771e1ca7ab1b20a3c8f20f0ef1150e285] | committer: Michael Niedermayer lavf/matroskadec: Ensure cues_end is initialized Ensure that cues_start and cues_end are always initialized and the webm_dash_manifest_cues function returns appropriate error if they are not computed correctly. This fixes coverity defect CID1231991. Signed-off-by: Vignesh Venkatasubramanian Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=080acf7771e1ca7ab1b20a3c8f20f0ef1150e285 --- libavformat/matroskadec.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index c19e8e9..83c1b3d 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3321,7 +3321,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s) EbmlList *seekhead_list = &matroska->seekhead; MatroskaSeekhead *seekhead = seekhead_list->elem; char *buf; -int64_t cues_start, cues_end, before_pos, bandwidth; +int64_t cues_start = -1, cues_end = -1, before_pos, bandwidth; int i; // determine cues start and end positions @@ -3340,6 +3340,7 @@ static int webm_dash_manifest_cues(AVFormatContext *s) cues_end = cues_start + cues_length + 11; // 11 is the offset of Cues ID. } avio_seek(matroska->ctx->pb, before_pos, SEEK_SET); +if (cues_start == -1 || cues_end == -1) return -1; // parse the cues matroska_parse_cues(matroska); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
Re: [FFmpeg-cvslog] avformat/matroskaenc: Check alpha_mode
On Mon, Aug 25, 2014 at 06:35:11AM +0200, Reimar Döffinger wrote: > On 24.08.2014, at 20:39, g...@videolan.org (Michael Niedermayer) wrote: > > -if ((tag = av_dict_get(st->metadata, "alpha_mode", NULL, 0)) || > > -(tag = av_dict_get( s->metadata, "alpha_mode", NULL, 0)) || > > +if (((tag = av_dict_get(st->metadata, "alpha_mode", NULL, 0)) && > > atoi(tag->value)) || > > +((tag = av_dict_get( s->metadata, "alpha_mode", NULL, 0)) && > > atoi(tag->value)) || > > Not sure it matters, but wouldn't value == NULL have worked before but would > crash now? iam not sure i understand tag->value should never be NULL av_dict_set with a NULL value would delete the entry [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB You can kill me, but you cannot change the truth. signature.asc Description: Digital signature ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] huffyuvenc: write last odd sample
ffmpeg | branch: master | Christophe Gisquet | Mon Aug 25 20:24:29 2014 +| [6ee7681723a41c8c9bf5f3d11c723c6907848f7d] | committer: Michael Niedermayer huffyuvenc: write last odd sample If width is odd, last sample wouldn't be written. Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6ee7681723a41c8c9bf5f3d11c723c6907848f7d --- libavcodec/huffyuvenc.c| 61 ++-- tests/ref/vsynth/vsynth3-ffvhuff420p12 |8 ++-- tests/ref/vsynth/vsynth3-ffvhuff422p10left |8 ++-- 3 files changed, 65 insertions(+), 12 deletions(-) diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c index fd6f570..c7e69d5 100644 --- a/libavcodec/huffyuvenc.c +++ b/libavcodec/huffyuvenc.c @@ -488,15 +488,31 @@ static int encode_422_bitstream(HYuvContext *s, int offset, int count) return 0; } -static int encode_plane_bitstream(HYuvContext *s, int count, int plane) +static int encode_plane_bitstream(HYuvContext *s, int width, int plane) { -int i; +int i, count = width/2; if (s->pb.buf_end - s->pb.buf - (put_bits_count(&s->pb) >> 3) < count * s->bps / 2) { av_log(s->avctx, AV_LOG_ERROR, "encoded frame too large\n"); return -1; } +#define LOADEND\ +int y0 = s->temp[0][width-1]; +#define LOADEND_14\ +int y0 = s->temp16[0][width-1] & mask; +#define LOADEND_16\ +int y0 = s->temp16[0][width-1]; +#define STATEND\ +s->stats[plane][y0]++; +#define STATEND_16\ +s->stats[plane][y0>>2]++; +#define WRITEEND\ +put_bits(&s->pb, s->len[plane][y0], s->bits[plane][y0]); +#define WRITEEND_16\ +put_bits(&s->pb, s->len[plane][y0>>2], s->bits[plane][y0>>2]);\ +put_bits(&s->pb, 2, y0&3); + #define LOAD2\ int y0 = s->temp[0][2 * i];\ int y1 = s->temp[0][2 * i + 1]; @@ -521,14 +537,16 @@ static int encode_plane_bitstream(HYuvContext *s, int count, int plane) put_bits(&s->pb, s->len[plane][y1>>2], s->bits[plane][y1>>2]);\ put_bits(&s->pb, 2, y1&3); -count /= 2; - if (s->bps <= 8) { if (s->flags & CODEC_FLAG_PASS1) { for (i = 0; i < count; i++) { LOAD2; STAT2; } +if (width&1) { +LOADEND; +STATEND; +} } if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) return 0; @@ -539,11 +557,20 @@ static int encode_plane_bitstream(HYuvContext *s, int count, int plane) STAT2; WRITE2; } +if (width&1) { +LOADEND; +STATEND; +WRITEEND; +} } else { for (i = 0; i < count; i++) { LOAD2; WRITE2; } +if (width&1) { +LOADEND; +WRITEEND; +} } } else if (s->bps <= 14) { int mask = s->n - 1; @@ -552,6 +579,10 @@ static int encode_plane_bitstream(HYuvContext *s, int count, int plane) LOAD2_14; STAT2; } +if (width&1) { +LOADEND_14; +STATEND; +} } if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) return 0; @@ -562,11 +593,20 @@ static int encode_plane_bitstream(HYuvContext *s, int count, int plane) STAT2; WRITE2; } +if (width&1) { +LOADEND_14; +STATEND; +WRITEEND; +} } else { for (i = 0; i < count; i++) { LOAD2_14; WRITE2; } +if (width&1) { +LOADEND_14; +WRITEEND; +} } } else { if (s->flags & CODEC_FLAG_PASS1) { @@ -574,6 +614,10 @@ static int encode_plane_bitstream(HYuvContext *s, int count, int plane) LOAD2_16; STAT2_16; } +if (width&1) { +LOADEND_16; +STATEND_16; +} } if (s->avctx->flags2 & CODEC_FLAG2_NO_OUTPUT) return 0; @@ -584,11 +628,20 @@ static int encode_plane_bitstream(HYuvContext *s, int count, int plane) STAT2_16; WRITE2_16; } +if (width&1) { +LOADEND_16; +STATEND_16; +WRITEEND_16; +} } else { for (i = 0; i < count; i++) { LOAD2_16; WRITE2_16; } +if (width&1) { +LOADEND_16; +WRITEEND_16; +} } } #undef LOAD2 diff --git a/tests/ref/vsynth/vsynth3-ffvhuff420p12 b/tests/ref/vsynth/vsynth3-ffvhuff420p12 index b51882e..3db1c5d 100644 --- a/tests/ref/vsynth/vsynth3-ffvhuff420p12 +++ b/tests/r
[FFmpeg-cvslog] huffyuvdec: decode the last odd sample
ffmpeg | branch: master | Christophe Gisquet | Mon Aug 25 20:24:30 2014 +| [f75baa6c9b1784866f3ecd7ec2ee223644c38e7b] | committer: Michael Niedermayer huffyuvdec: decode the last odd sample Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f75baa6c9b1784866f3ecd7ec2ee223644c38e7b --- libavcodec/huffyuvdec.c| 26 ++ tests/ref/vsynth/vsynth3-ffvhuff420p12 |4 ++-- tests/ref/vsynth/vsynth3-ffvhuff422p10left |4 ++-- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c index bc5ad15..1df77e0 100644 --- a/libavcodec/huffyuvdec.c +++ b/libavcodec/huffyuvdec.c @@ -660,11 +660,9 @@ static void decode_422_bitstream(HYuvContext *s, int count) dst1 = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2;\ dst1 += get_bits(&s->gb, 2);\ } -static void decode_plane_bitstream(HYuvContext *s, int count, int plane) +static void decode_plane_bitstream(HYuvContext *s, int width, int plane) { -int i; - -count /= 2; +int i, count = width/2; if (s->bps <= 8) { OPEN_READER(re, &s->gb); @@ -677,6 +675,14 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane) READ_2PIX_PLANE(s->temp[0][2 * i], s->temp[0][2 * i + 1], plane, OP8bits); } } +if( width&1 && BITS_LEFT(re, &s->gb)>0 ) { +unsigned int index; +int nb_bits, code, n; +UPDATE_CACHE(re, &s->gb); +index = SHOW_UBITS(re, &s->gb, VLC_BITS); +VLC_INTERN(s->temp[0][width-1], s->vlc[plane].table, + &s->gb, re, VLC_BITS, 3); +} CLOSE_READER(re, &s->gb); } else if (s->bps <= 14) { OPEN_READER(re, &s->gb); @@ -689,6 +695,14 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane) READ_2PIX_PLANE(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane, OP14bits); } } +if( width&1 && BITS_LEFT(re, &s->gb)>0 ) { +unsigned int index; +int nb_bits, code, n; +UPDATE_CACHE(re, &s->gb); +index = SHOW_UBITS(re, &s->gb, VLC_BITS); +VLC_INTERN(s->temp16[0][width-1], s->vlc[plane].table, + &s->gb, re, VLC_BITS, 3); +} CLOSE_READER(re, &s->gb); } else { if (count >= (get_bits_left(&s->gb)) / (32 * 2)) { @@ -700,6 +714,10 @@ static void decode_plane_bitstream(HYuvContext *s, int count, int plane) READ_2PIX_PLANE16(s->temp16[0][2 * i], s->temp16[0][2 * i + 1], plane); } } +if( width&1 && get_bits_left(&s->gb)>0 ) { +int dst = get_vlc2(&s->gb, s->vlc[plane].table, VLC_BITS, 3)<<2; +s->temp16[0][width-1] = dst + get_bits(&s->gb, 2); +} } } diff --git a/tests/ref/vsynth/vsynth3-ffvhuff420p12 b/tests/ref/vsynth/vsynth3-ffvhuff420p12 index 3db1c5d..2d775d9 100644 --- a/tests/ref/vsynth/vsynth3-ffvhuff420p12 +++ b/tests/ref/vsynth/vsynth3-ffvhuff420p12 @@ -1,4 +1,4 @@ 9b3e44ccdd28614f588804a0682db312 *tests/data/fate/vsynth3-ffvhuff420p12.avi 175256 tests/data/fate/vsynth3-ffvhuff420p12.avi -faf8b5ec29b12ac41b1bd1a6ebd8a757 *tests/data/fate/vsynth3-ffvhuff420p12.out.rawvideo -stddev: 47.95 PSNR: 14.51 MAXDIFF: 237 bytes:86700/86700 +ee95a44ccd612b5057860b43fe9775d6 *tests/data/fate/vsynth3-ffvhuff420p12.out.rawvideo +stddev:0.69 PSNR: 51.35 MAXDIFF:1 bytes:86700/86700 diff --git a/tests/ref/vsynth/vsynth3-ffvhuff422p10left b/tests/ref/vsynth/vsynth3-ffvhuff422p10left index a18f2c8..d62ee0f 100644 --- a/tests/ref/vsynth/vsynth3-ffvhuff422p10left +++ b/tests/ref/vsynth/vsynth3-ffvhuff422p10left @@ -1,4 +1,4 @@ 5afec2536440c892919a1569c7109858 *tests/data/fate/vsynth3-ffvhuff422p10left.avi 173548 tests/data/fate/vsynth3-ffvhuff422p10left.avi -7815024a7239be263c6bf910021df1a0 *tests/data/fate/vsynth3-ffvhuff422p10left.out.rawvideo -stddev: 38.41 PSNR: 16.44 MAXDIFF: 237 bytes:86700/86700 +0cf7cf68724fa5146b1667e4fa08b0e1 *tests/data/fate/vsynth3-ffvhuff422p10left.out.rawvideo +stddev:2.12 PSNR: 41.58 MAXDIFF: 26 bytes:86700/86700 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/vp9: Use av_malloc_array()
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 25 18:33:11 2014 +0200| [2a85826e5753aac8964254bd5688a03e49a7f551] | committer: Michael Niedermayer avcodec/vp9: Use av_malloc_array() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2a85826e5753aac8964254bd5688a03e49a7f551 --- libavcodec/vp9.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index 8f22685..31725e6 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -368,7 +368,7 @@ static int update_block_buffers(AVCodecContext *ctx) if (s->uses_2pass) { int sbs = s->sb_cols * s->sb_rows; -s->b_base = av_malloc(sizeof(VP9Block) * s->cols * s->rows); +s->b_base = av_malloc_array(s->cols * s->rows, sizeof(VP9Block)); s->block_base = av_mallocz((64 * 64 + 128) * sbs * 3); if (!s->b_base || !s->block_base) return AVERROR(ENOMEM); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavformat/ftp: Do not leak memory in routine ftp_features
ffmpeg | branch: master | Alexander Strasser | Wed Aug 20 00:41:55 2014 +0200| [db85d11d9d880c932b13d37b5f1ca2bc9e3a253b] | committer: Alexander Strasser libavformat/ftp: Do not leak memory in routine ftp_features Setting the pointer to NULL inside both ftp_send_command and ftp_features is redundant. Generally always setting to NULL in ftp_send_command seems safer, but throughout the file that parameter was always passed initialized. So I do it here too for consistency. Should fix CID1231988 (RESOURCE_LEAK) OKed-by: Lukasz Marek Signed-off-by: Alexander Strasser > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db85d11d9d880c932b13d37b5f1ca2bc9e3a253b --- libavformat/ftp.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/ftp.c b/libavformat/ftp.c index 9ee9b16..7faf4a5 100644 --- a/libavformat/ftp.c +++ b/libavformat/ftp.c @@ -183,6 +183,9 @@ static int ftp_send_command(FTPContext *s, const char *command, { int err; +if (response) +*response = NULL; + if ((err = ffurl_write(s->conn_control, command, strlen(command))) < 0) return err; if (!err) @@ -444,12 +447,14 @@ static int ftp_features(FTPContext *s) static const char *enable_utf8_command = "OPTS UTF8 ON\r\n"; static const int feat_codes[] = {211, 0}; static const int opts_codes[] = {200, 451}; -char *feat; +char *feat = NULL; if (ftp_send_command(s, feat_command, feat_codes, &feat) == 211) { if (av_stristr(feat, "UTF8")) ftp_send_command(s, enable_utf8_command, opts_codes, NULL); } +av_freep(&feat); + return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] ffplay: use av_malloc_array()
ffmpeg | branch: master | Michael Niedermayer | Mon Aug 25 18:32:53 2014 +0200| [e96109f93ce90908d5be44b31c152e3be36f184c] | committer: Michael Niedermayer ffplay: use av_malloc_array() Reviewed-by: Marton Balint Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e96109f93ce90908d5be44b31c152e3be36f184c --- ffplay.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffplay.c b/ffplay.c index e66dea1..833b5b1 100644 --- a/ffplay.c +++ b/ffplay.c @@ -991,7 +991,7 @@ static void video_audio_display(VideoState *s) av_free(s->rdft_data); s->rdft = av_rdft_init(rdft_bits, DFT_R2C); s->rdft_bits = rdft_bits; -s->rdft_data = av_malloc(4 * nb_freq * sizeof(*s->rdft_data)); +s->rdft_data = av_malloc_array(nb_freq, 4 *sizeof(*s->rdft_data)); } { FFTSample *data[2]; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/snow: remove possibly wrong todo item
ffmpeg | branch: master | Michael Niedermayer | Tue Aug 26 00:27:28 2014 +0200| [1f7e6c07130cd1b90b0ab35d519118d97baa766d] | committer: Michael Niedermayer doc/snow: remove possibly wrong todo item Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1f7e6c07130cd1b90b0ab35d519118d97baa766d --- doc/snow.txt |1 - 1 file changed, 1 deletion(-) diff --git a/doc/snow.txt b/doc/snow.txt index 080a33b..9d5778d 100644 --- a/doc/snow.txt +++ b/doc/snow.txt @@ -618,7 +618,6 @@ flip wavelet? try to use the wavelet transformed predicted image (motion compensated image) as context for coding the residual coefficients try the MV length as context for coding the residual coefficients use extradata for stuff which is in the keyframes now? -the MV median predictor is patented IIRC implement per picture halfpel interpolation try different range coder state transition tables for different contexts ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/rtpdec: support for HEVC/H.265 RTP payload format (draft v6) depacketizing
ffmpeg | branch: master | ThomasVolkert | Tue Aug 26 00:51:59 2014 +0200| [96b2ba68c4aef4e92b3e9de87d1fb94f2fb659f0] | committer: Michael Niedermayer avformat/rtpdec: support for HEVC/H.265 RTP payload format (draft v6) depacketizing > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=96b2ba68c4aef4e92b3e9de87d1fb94f2fb659f0 --- MAINTAINERS |1 + libavformat/Makefile |1 + libavformat/rtpdec.c |2 + libavformat/rtpdec_formats.h |2 + libavformat/rtpdec_hevc.c| 407 ++ 5 files changed, 413 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 7216056..b80fe7a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -460,6 +460,7 @@ Muxers/Demuxers: rtmp* Kostya Shishkov rtp.c, rtpenc.c Martin Storsjo rtpdec_h261.*, rtpenc_h261.* Thomas Volkert + rtpdec_hevc.* Thomas Volkert rtpdec_asf.* Ronald S. Bultje rtpenc_mpv.*, rtpenc_aac.*Martin Storsjo rtsp.cLuca Barbato diff --git a/libavformat/Makefile b/libavformat/Makefile index 3c63f1b..3d124fb 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -37,6 +37,7 @@ OBJS-$(CONFIG_RTPDEC)+= rdt.o \ rtpdec_h263.o \ rtpdec_h263_rfc2190.o \ rtpdec_h264.o \ +rtpdec_hevc.o \ rtpdec_ilbc.o \ rtpdec_jpeg.o \ rtpdec_latm.o \ diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index 0ea541f..a78af87 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -77,6 +77,8 @@ void ff_register_rtp_dynamic_payload_handlers(void) ff_register_dynamic_payload_handler(&ff_h263_2000_dynamic_handler); ff_register_dynamic_payload_handler(&ff_h263_rfc2190_dynamic_handler); ff_register_dynamic_payload_handler(&ff_h264_dynamic_handler); +ff_register_dynamic_payload_handler(&ff_h265_dynamic_handler); +ff_register_dynamic_payload_handler(&ff_hevc_dynamic_handler); ff_register_dynamic_payload_handler(&ff_ilbc_dynamic_handler); ff_register_dynamic_payload_handler(&ff_jpeg_dynamic_handler); ff_register_dynamic_payload_handler(&ff_mp4a_latm_dynamic_handler); diff --git a/libavformat/rtpdec_formats.h b/libavformat/rtpdec_formats.h index 9226eeb..d915fab 100644 --- a/libavformat/rtpdec_formats.h +++ b/libavformat/rtpdec_formats.h @@ -50,6 +50,8 @@ extern RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler; extern RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler; extern RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler; extern RTPDynamicProtocolHandler ff_h264_dynamic_handler; +extern RTPDynamicProtocolHandler ff_h265_dynamic_handler; +extern RTPDynamicProtocolHandler ff_hevc_dynamic_handler; extern RTPDynamicProtocolHandler ff_ilbc_dynamic_handler; extern RTPDynamicProtocolHandler ff_jpeg_dynamic_handler; extern RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler; diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c new file mode 100644 index 000..2cc76dc --- /dev/null +++ b/libavformat/rtpdec_hevc.c @@ -0,0 +1,407 @@ +/* + * RTP parser for HEVC/H.265 payload format (draft version 6) + * Copyright (c) 2014 Thomas Volkert + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/avstring.h" +#include "avformat.h" +#include "rtpdec.h" + +#define RTP_HEVC_PAYLOAD_HEADER_SIZE2 +#define RTP_HEVC_FU_HEADER_SIZE 1 +#define RTP_HEVC_DONL_FIELDS_SIZE 2 +#define HEVC_SPECIFIED_NAL_UNIT_TYPES 48 + +struct PayloadContext { +/* SDP out-of-band signaling data */ +int using_donl_field; +int profile_id; +/* debugging */ +#ifdef DEBUG +int packets_received[HEVC_SPECIFI
[FFmpeg-cvslog] configure: update libvpx_vp9_encoder check
ffmpeg | branch: master | James Almer | Tue Aug 26 00:24:39 2014 -0300| [c2c56d54ee900867690e71e5154593c907229061] | committer: James Almer configure: update libvpx_vp9_encoder check Required to add support for the aq_mode setting. Any libvpx snapshot prior to 1.3.0 is not recommended for vp9 encoding for that matter. Reviewed-by: James Zern Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c2c56d54ee900867690e71e5154593c907229061 --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 0e13520..8e5f49b 100755 --- a/configure +++ b/configure @@ -4846,7 +4846,7 @@ enabled libvpx&& { enabled libvpx_vp8_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VP8E_SET_MAX_INTRA_BITRATE_PCT" -lvpx || die "ERROR: libvpx encoder version must be >=0.9.7"; } enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; } -enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VP9E_SET_SVC" -lvpx || disable libvpx_vp9_encoder; } } +enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VP9E_SET_AQ_MODE" -lvpx || disable libvpx_vp9_encoder; } } enabled libwavpack&& require libwavpack wavpack/wavpack.h WavpackOpenFileOutput -lwavpack enabled libwebp && require_pkg_config libwebp webp/encode.h WebPGetEncoderVersion && { check_code cc webp/encode.h "WebPPicture wp; wp.use_argb++" || ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog