[FFmpeg-cvslog] doc: fix typing mistake
ffmpeg | branch: master | Rémi Denis-Courmont r...@remlab.net | Tue Oct 14 12:59:52 2014 +0300| [e09a947c1a856d9d34199a13ee378fe46be53d3a] | committer: Anton Khirnov doc: fix typing mistake Signed-off-by: Anton Khirnov an...@khirnov.net http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e09a947c1a856d9d34199a13ee378fe46be53d3a --- doc/APIchanges |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 48b0ac8..a8c8e2e 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,7 +13,7 @@ libavutil: 2014-08-09 API changes, most recent first: -2014-10-13 - xxx - lavc 55.03.0 - avcodec.h +2014-10-13 - xxx - lavc 56.03.0 - avcodec.h Add AVCodecContext.initial_padding. Deprecate the use of AVCodecContext.delay for audio encoding. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'e09a947c1a856d9d34199a13ee378fe46be53d3a'
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 12:08:09 2014 +0200| [a72e75bf980c4faf3940be20e891050fe6dfe409] | committer: Michael Niedermayer Merge commit 'e09a947c1a856d9d34199a13ee378fe46be53d3a' * commit 'e09a947c1a856d9d34199a13ee378fe46be53d3a': doc: fix typing mistake Merged-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a72e75bf980c4faf3940be20e891050fe6dfe409 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'c1724623ce0433c6a9ee72133b1fd4db75ec7193'
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 12:17:15 2014 +0200| [fd937866f7b7ae3303e8a78b1e9a48d853360d62] | committer: Michael Niedermayer Merge commit 'c1724623ce0433c6a9ee72133b1fd4db75ec7193' * commit 'c1724623ce0433c6a9ee72133b1fd4db75ec7193': vdpau: have av_vdpau_bind_context() fail on unsupported flag Merged-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fd937866f7b7ae3303e8a78b1e9a48d853360d62 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vdpau: have av_vdpau_bind_context() fail on unsupported flag
ffmpeg | branch: master | Rémi Denis-Courmont r...@remlab.net | Tue Oct 14 12:59:53 2014 +0300| [c1724623ce0433c6a9ee72133b1fd4db75ec7193] | committer: Anton Khirnov vdpau: have av_vdpau_bind_context() fail on unsupported flag Currently, no flags are supported. Signed-off-by: Anton Khirnov an...@khirnov.net http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c1724623ce0433c6a9ee72133b1fd4db75ec7193 --- libavcodec/vdpau.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 44eef20..9805a8d 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -313,6 +313,9 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device, { VDPAUHWContext *hwctx; +if (flags != 0) +return AVERROR(EINVAL); + if (av_reallocp(avctx-hwaccel_context, sizeof(*hwctx))) return AVERROR(ENOMEM); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vdpau: add AV_HWACCEL_FLAG_IGNORE_LEVEL to skip the codec level check
ffmpeg | branch: master | Rémi Denis-Courmont r...@remlab.net | Tue Oct 14 12:59:54 2014 +0300| [d565fef1b83b6c5f8afb32229260b79f67c68109] | committer: Anton Khirnov vdpau: add AV_HWACCEL_FLAG_IGNORE_LEVEL to skip the codec level check Decoding acceleration may work even if the codec level is higher than the stated limit of the VDPAU driver. Or the problem may be considered acceptable by the user. This flag allows skipping the codec level capability checks and proceed with decoding. Applications should obviously not set this flag by default, but only if the user explicitly requested this behavior (and presumably knows how to turn it back off if it fails). Signed-off-by: Anton Khirnov an...@khirnov.net http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d565fef1b83b6c5f8afb32229260b79f67c68109 --- doc/APIchanges |3 +++ libavcodec/avcodec.h| 14 +- libavcodec/vdpau.c |7 +-- libavcodec/vdpau.h |2 +- libavcodec/vdpau_internal.h |1 + libavcodec/version.h|2 +- 6 files changed, 24 insertions(+), 5 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index a8c8e2e..59d2d03 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2014-08-09 API changes, most recent first: +2014-10-xx - xxx - lavc 56.4.0 - avcodec.h + Add AV_HWACCEL_FLAG_IGNORE_LEVEL flag to av_vdpau_bind_context(). + 2014-10-13 - xxx - lavc 56.03.0 - avcodec.h Add AVCodecContext.initial_padding. Deprecate the use of AVCodecContext.delay for audio encoding. diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index a24ce40..8e6c019 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2900,7 +2900,8 @@ typedef struct AVCodec { } AVCodec; /** - * AVHWAccel. + * @defgroup lavc_hwaccel AVHWAccel + * @{ */ typedef struct AVHWAccel { /** @@ -3025,6 +3026,17 @@ typedef struct AVHWAccel { } AVHWAccel; /** + * Hardware acceleration should be used for decoding even if the codec level + * used is unknown or higher than the maximum supported level reported by the + * hardware driver. + */ +#define AV_HWACCEL_FLAG_IGNORE_LEVEL (1 0) + +/** + * @} + */ + +/** * @defgroup lavc_picture AVPicture * * Functions for working with AVPicture diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index 9805a8d..1d68e70 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -94,7 +94,9 @@ int ff_vdpau_common_init(AVCodecContext *avctx, VdpDecoderProfile profile, vdctx-device = hwctx-device; vdctx-get_proc_address = hwctx-get_proc_address; -if (level 0) +if (hwctx-flags AV_HWACCEL_FLAG_IGNORE_LEVEL) +level = 0; +else if (level 0) return AVERROR(ENOTSUP); status = vdctx-get_proc_address(vdctx-device, @@ -313,7 +315,7 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device, { VDPAUHWContext *hwctx; -if (flags != 0) +if (flags ~AV_HWACCEL_FLAG_IGNORE_LEVEL) return AVERROR(EINVAL); if (av_reallocp(avctx-hwaccel_context, sizeof(*hwctx))) @@ -325,6 +327,7 @@ int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device, hwctx-context.decoder = VDP_INVALID_HANDLE; hwctx-device = device; hwctx-get_proc_address = get_proc; +hwctx-flags= flags; hwctx-reset= 1; return 0; } diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h index 1714b1e..24c3b02 100644 --- a/libavcodec/vdpau.h +++ b/libavcodec/vdpau.h @@ -143,7 +143,7 @@ typedef struct AVVDPAUContext { * @param avctx decoding context whose get_format() callback is invoked * @param device VDPAU device handle to use for hardware acceleration * @param get_proc_address VDPAU device driver - * @param flags for future use, must be zero + * @param flags zero of more OR'd AV_HWACCEL_FLAG_* flags * * @return 0 on success, an AVERROR code on failure. */ diff --git a/libavcodec/vdpau_internal.h b/libavcodec/vdpau_internal.h index 69cd455..16493b0 100644 --- a/libavcodec/vdpau_internal.h +++ b/libavcodec/vdpau_internal.h @@ -53,6 +53,7 @@ typedef struct VDPAUHWContext { VdpDevice device; VdpGetProcAddress *get_proc_address; char reset; +unsigned char flags; } VDPAUHWContext; typedef struct VDPAUContext { diff --git a/libavcodec/version.h b/libavcodec/version.h index c44686d..097dee3 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include libavutil/version.h #define LIBAVCODEC_VERSION_MAJOR 56 -#define LIBAVCODEC_VERSION_MINOR 3 +#define LIBAVCODEC_VERSION_MINOR 4 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41'
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 13:38:10 2014 +0200| [17085a0251a1493f6447aa3d2ee06fda2c9402f0] | committer: Michael Niedermayer Merge commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41' * commit '7ea1b3472a61de4aa4d41b571e99418e4997ad41': lavc: deprecate the use of AVCodecContext.time_base for decoding Conflicts: libavcodec/avcodec.h libavcodec/h264.c libavcodec/mpegvideo_parser.c libavcodec/utils.c libavcodec/version.h Merged-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=17085a0251a1493f6447aa3d2ee06fda2c9402f0 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/vc1: fix time_base and framerate
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 15:54:02 2014 +0200| [220a15c074876b04760e60aeae5badc7412b2f83] | committer: Michael Niedermayer avcodec/vc1: fix time_base and framerate They are not just inverses of each other. This should restore behavior to before the introduction of framerate Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=220a15c074876b04760e60aeae5badc7412b2f83 --- libavcodec/vc1.c|1 - libavcodec/vc1_parser.c |2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index b03eb94..b3955f2 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -490,7 +490,6 @@ static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb) } } if (v-broadcast) { // Pulldown may be present -v-s.avctx-framerate.num *= 2; v-s.avctx-ticks_per_frame = 2; } } diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index 33e672f..3a2308e 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -112,6 +112,8 @@ static void vc1_extract_header(AVCodecParserContext *s, AVCodecContext *avctx, break; } +if (avctx-framerate.num) +avctx-time_base = av_inv_q(av_mul_q(avctx-framerate, (AVRational){avctx-ticks_per_frame, 1})); } static int vc1_parse(AVCodecParserContext *s, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/mpeg12dec: fix time_base and framerate
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 15:54:02 2014 +0200| [620e7f0f3b3dff85d9c49a5c4b8a5df7143af7fe] | committer: Michael Niedermayer avcodec/mpeg12dec: fix time_base and framerate They are not just inverses of each other. This should restore behavior to before the introduction of framerate Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=620e7f0f3b3dff85d9c49a5c4b8a5df7143af7fe --- libavcodec/mpeg12dec.c|2 +- libavcodec/mpegvideo_parser.c |8 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 1f7fca5..40962ac 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1316,7 +1316,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) // MPEG-2 fps av_reduce(s-avctx-framerate.num, s-avctx-framerate.den, - ff_mpeg12_frame_rate_tab[s-frame_rate_index].num * s1-frame_rate_ext.num * 2, + ff_mpeg12_frame_rate_tab[s-frame_rate_index].num * s1-frame_rate_ext.num, ff_mpeg12_frame_rate_tab[s-frame_rate_index].den * s1-frame_rate_ext.den, 1 30); avctx-ticks_per_frame = 2; diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index 668a946..0159421 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -73,6 +73,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, pc-frame_rate = avctx-framerate = ff_mpeg12_frame_rate_tab[frame_rate_index]; bit_rate = (buf[4]10) | (buf[5]2) | (buf[6]6); avctx-codec_id = AV_CODEC_ID_MPEG1VIDEO; +avctx-ticks_per_frame = 1; } break; case EXT_START_CODE: @@ -94,9 +95,10 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, bit_rate = (bit_rate0x3) | (bit_rate_ext 18); if(did_set_size) ff_set_dimensions(avctx, pc-width, pc-height); -avctx-framerate.num = pc-frame_rate.num * (frame_rate_ext_n + 1) * 2; +avctx-framerate.num = pc-frame_rate.num * (frame_rate_ext_n + 1); avctx-framerate.den = pc-frame_rate.den * (frame_rate_ext_d + 1); avctx-codec_id = AV_CODEC_ID_MPEG2VIDEO; +avctx-ticks_per_frame = 2; } break; case 0x8: /* picture coding extension */ @@ -151,7 +153,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, } #if FF_API_AVCTX_TIMEBASE if (avctx-framerate.num) -avctx-time_base = av_inv_q(avctx-framerate); +avctx-time_base = av_inv_q(av_mul_q(avctx-framerate, (AVRational){avctx-ticks_per_frame, 1})); #endif } @@ -181,7 +183,7 @@ static int mpegvideo_parse(AVCodecParserContext *s, function should be negligible for uncorrupted streams */ mpegvideo_extract_headers(s, avctx, buf, buf_size); av_dlog(NULL, pict_type=%d frame_rate=%0.3f repeat_pict=%d\n, -s-pict_type, (double)avctx-time_base.den / avctx-time_base.num, s-repeat_pict); +s-pict_type, av_q2d(avctx-framerate), s-repeat_pict); *poutbuf = buf; *poutbuf_size = buf_size; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/h264: fix time_base and framerate
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 15:54:02 2014 +0200| [09450c55092523d073f7ec415f863531838ca908] | committer: Michael Niedermayer avcodec/h264: fix time_base and framerate They are not just inverses of each other. This should restore behavior to before the introduction of framerate Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09450c55092523d073f7ec415f863531838ca908 --- libavcodec/h264.c|6 +++--- libavcodec/h264_parser.c |2 ++ libavcodec/h264_slice.c |2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 6aa174d..0405779 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -688,10 +688,10 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) ff_h264_reset_sei(h); if (avctx-codec_id == AV_CODEC_ID_H264) { if (avctx-ticks_per_frame == 1) { -if(h-avctx-framerate.num INT_MAX/2) { -h-avctx-framerate.num *= 2; +if(h-avctx-time_base.den INT_MAX/2) { +h-avctx-time_base.den *= 2; } else -h-avctx-framerate.den /= 2; +h-avctx-time_base.num /= 2; } avctx-ticks_per_frame = 2; } diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 36cf980..ac4d73a 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -490,6 +490,8 @@ static int h264_parse(AVCodecParserContext *s, parse_nal_units(s, avctx, buf, buf_size); +if (avctx-framerate.num) +avctx-time_base = av_inv_q(av_mul_q(avctx-framerate, (AVRational){avctx-ticks_per_frame, 1})); if (h-sei_cpb_removal_delay = 0) { s-dts_sync_point= h-sei_buffering_period_present; s-dts_ref_dts_delta = h-sei_cpb_removal_delay; diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 64aebfa..17c7b47 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1171,7 +1171,7 @@ static int h264_slice_header_init(H264Context *h, int reinit) if (h-x264_build 44U) den *= 2; av_reduce(h-avctx-framerate.den, h-avctx-framerate.num, - h-sps.num_units_in_tick, den, 1 30); + h-sps.num_units_in_tick * h-avctx-ticks_per_frame, den, 1 30); } if (reinit) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/dpx: fix framerate
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 15:57:15 2014 +0200| [18255441dd74e0bde4fbc8f2f6a1a356fc14df6e] | committer: Michael Niedermayer avcodec/dpx: fix framerate Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18255441dd74e0bde4fbc8f2f6a1a356fc14df6e --- libavcodec/dpx.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 5d8c4f3..3b78486 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -163,7 +163,7 @@ static int decode_frame(AVCodecContext *avctx, if(i) { AVRational q = av_d2q(av_int2float(i), 4096); if (q.num 0 q.den 0) -avctx-time_base = av_inv_q(q); +avctx-framerate = q; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/utils: fix time_base after the framerate addition
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 15:50:49 2014 +0200| [801876fb079ecac157dbbffe2b6d10f2e2408fbf] | committer: Michael Niedermayer avcodec/utils: fix time_base after the framerate addition time_base != 1/framerate for example for interlaced video Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=801876fb079ecac157dbbffe2b6d10f2e2408fbf --- libavcodec/utils.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 12d0196..9f65340 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1677,7 +1677,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code #if FF_API_AVCTX_TIMEBASE if (avctx-framerate.num 0 avctx-framerate.den 0) -avctx-time_base = av_inv_q(avctx-framerate); +avctx-time_base = av_inv_q(av_mul_q(avctx-framerate, (AVRational){avctx-ticks_per_frame, 1})); #endif } end: @@ -2391,7 +2391,7 @@ fail: #if FF_API_AVCTX_TIMEBASE if (avctx-framerate.num 0 avctx-framerate.den 0) -avctx-time_base = av_inv_q(avctx-framerate); +avctx-time_base = av_inv_q(av_mul_q(avctx-framerate, (AVRational){avctx-ticks_per_frame, 1})); #endif return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavc: deprecate the use of AVCodecContext.time_base for decoding
ffmpeg | branch: master | Anton Khirnov an...@khirnov.net | Fri Apr 4 12:47:44 2014 +0200| [7ea1b3472a61de4aa4d41b571e99418e4997ad41] | committer: Anton Khirnov lavc: deprecate the use of AVCodecContext.time_base for decoding When decoding, this field holds the inverse of the framerate that can be written in the headers for some codecs. Using a field called 'time_base' for this is very misleading, as there are no timestamps associated with it. Furthermore, this field is used for a very different purpose during encoding. Add a new field, called 'framerate', to replace the use of time_base for decoding. http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7ea1b3472a61de4aa4d41b571e99418e4997ad41 --- doc/APIchanges |4 libavcodec/avcodec.h| 11 ++- libavcodec/cavsdec.c|3 +-- libavcodec/dirac.c |3 +-- libavcodec/dvdec.c |2 +- libavcodec/eacmv.c |2 +- libavcodec/eamad.c |2 +- libavcodec/eatgq.c |2 +- libavcodec/eatgv.c |2 +- libavcodec/eatqi.c |2 +- libavcodec/h261dec.c|2 +- libavcodec/h264.c |2 +- libavcodec/h264_slice.c |2 +- libavcodec/hevc.c |2 +- libavcodec/ituh263dec.c | 20 ++-- libavcodec/libschroedingerdec.c |4 ++-- libavcodec/mpeg12dec.c |7 +++ libavcodec/mpeg4videodec.c | 19 +-- libavcodec/mpegvideo_parser.c | 11 +++ libavcodec/options.c|1 + libavcodec/pthread_frame.c |1 + libavcodec/utils.c | 10 ++ libavcodec/vaapi_mpeg4.c|2 +- libavcodec/vc1.c| 10 +- libavcodec/vdpau_mpeg4.c|2 +- libavcodec/version.h|5 - libavcodec/vp3.c|2 +- 27 files changed, 81 insertions(+), 54 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 59d2d03..a8b7091 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,10 @@ libavutil: 2014-08-09 API changes, most recent first: +2014-10-xx - xxx - lavc 56.5.0 - avcodec.h + Replace AVCodecContext.time_base used for decoding + with AVCodecContext.framerate. + 2014-10-xx - xxx - lavc 56.4.0 - avcodec.h Add AV_HWACCEL_FLAG_IGNORE_LEVEL flag to av_vdpau_bind_context(). diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 8e6c019..b79133f 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1170,7 +1170,8 @@ typedef struct AVCodecContext { * timebase should be 1/framerate and timestamp increments should be * identically 1. * - encoding: MUST be set by user. - * - decoding: Set by libavcodec. + * - decoding: the use of this field for decoding is deprecated. + * Use framerate instead. */ AVRational time_base; @@ -2788,6 +2789,14 @@ typedef struct AVCodecContext { * -initial_padding. */ int initial_padding; + +/* + * - decoding: For codecs that store a framerate value in the compressed + * bitstream, the decoder may export it here. { 0, 1} when + * unknown. + * - encoding: unused + */ +AVRational framerate; } AVCodecContext; /** diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index fbbd048..d0c72a7 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -1106,8 +1106,7 @@ static int decode_seq_header(AVSContext *h) h-low_delay = get_bits1(h-gb); h-mb_width = (h-width + 15) 4; h-mb_height = (h-height + 15) 4; -h-avctx-time_base.den = ff_mpeg12_frame_rate_tab[frame_rate_code].num; -h-avctx-time_base.num = ff_mpeg12_frame_rate_tab[frame_rate_code].den; +h-avctx-framerate = ff_mpeg12_frame_rate_tab[frame_rate_code]; h-avctx-width = h-width; h-avctx-height = h-height; if (!h-top_qp) diff --git a/libavcodec/dirac.c b/libavcodec/dirac.c index 10c29d7..5e13a84 100644 --- a/libavcodec/dirac.c +++ b/libavcodec/dirac.c @@ -172,8 +172,7 @@ static int parse_source_parameters(AVCodecContext *avctx, GetBitContext *gb, /* [DIRAC_STD] Table 10.3 values 9-10 */ frame_rate = dirac_frame_rate[source-frame_rate_index - 9]; } -av_reduce(avctx-time_base.num, avctx-time_base.den, - frame_rate.den, frame_rate.num, 1 30); +avctx-framerate = frame_rate; /* [DIRAC_STD] 10.3.6 Pixel Aspect Ratio. * pixel_aspect_ratio(video_params) */ diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index 611a4a7..a1235d3 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -373,7 +373,7 @@ static int dvvideo_decode_frame(AVCodecContext *avctx, void *data, s-frame-key_frame = 1; s-frame-pict_type = AV_PICTURE_TYPE_I; avctx-pix_fmt = s-sys-pix_fmt; -avctx-time_base=
[FFmpeg-cvslog] avformat/utils: use av_reduce() to simplify code and avoid overflow in ff_compute_frame_duration()
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 18:23:21 2014 +0200| [a92192d2e4f7ff3078b128592f6673089b221cc4] | committer: Michael Niedermayer avformat/utils: use av_reduce() to simplify code and avoid overflow in ff_compute_frame_duration() Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a92192d2e4f7ff3078b128592f6673089b221cc4 --- libavformat/utils.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 20e1b21..909c7de 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -726,17 +726,18 @@ void ff_compute_frame_duration(AVFormatContext *s, int *pnum, int *pden, AVStrea *pnum = st-time_base.num; *pden = st-time_base.den; } else if (codec_framerate.den * 1000LL codec_framerate.num) { -*pnum = codec_framerate.den; -*pden = codec_framerate.num; - -*pden *= st-codec-ticks_per_frame; av_assert0(st-codec-ticks_per_frame); +av_reduce(pnum, pden, + codec_framerate.den, + codec_framerate.num * (int64_t)st-codec-ticks_per_frame, + INT_MAX); + if (pc pc-repeat_pict) { av_assert0(s-iformat); // this may be wrong for interlaced encoding but its not used for that case -if (*pnum INT_MAX / (1 + pc-repeat_pict)) -*pden /= 1 + pc-repeat_pict; -else -*pnum *= 1 + pc-repeat_pict; +av_reduce(pnum, pden, + (*pnum) * (1LL + pc-repeat_pict), + (*pden), + INT_MAX); } /* If this codec can be interlaced or progressive then we need * a parser to compute duration of a packet. Thus if we have ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avconv: replace AVCodecContext.time_base with framerate
ffmpeg | branch: master | Anton Khirnov an...@khirnov.net | Fri Apr 4 13:06:22 2014 +0200| [557d4c4ecae080729e68df54ed2bd8420d0f037a] | committer: Anton Khirnov avconv: replace AVCodecContext.time_base with framerate http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=557d4c4ecae080729e68df54ed2bd8420d0f037a --- avconv.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/avconv.c b/avconv.c index 7dd335e..972e62b 100644 --- a/avconv.c +++ b/avconv.c @@ -1401,10 +1401,10 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt) else if (ist-st-avg_frame_rate.num) ist-next_dts += av_rescale_q(1, av_inv_q(ist-st-avg_frame_rate), AV_TIME_BASE_Q); -else if (ist-dec_ctx-time_base.num != 0) { +else if (ist-dec_ctx-framerate.num != 0) { int ticks = ist-st-parser ? ist-st-parser-repeat_pict + 1 : ist-dec_ctx-ticks_per_frame; -ist-next_dts += av_rescale_q(ticks, ist-dec_ctx-time_base, AV_TIME_BASE_Q); +ist-next_dts += av_rescale_q(ticks, ist-dec_ctx-framerate, AV_TIME_BASE_Q); } break; case AVMEDIA_TYPE_SUBTITLE: @@ -1435,11 +1435,11 @@ static int process_input_packet(InputStream *ist, const AVPacket *pkt) ist-dec_ctx-sample_rate; break; case AVMEDIA_TYPE_VIDEO: -if (ist-dec_ctx-time_base.num != 0) { +if (ist-dec_ctx-framerate.num != 0) { int ticks = ist-st-parser ? ist-st-parser-repeat_pict + 1 : ist-dec_ctx-ticks_per_frame; ist-next_dts += ((int64_t)AV_TIME_BASE * - ist-dec_ctx-time_base.num * ticks) / - ist-dec_ctx-time_base.den; + ist-dec_ctx-framerate.den * ticks) / + ist-dec_ctx-framerate.num; } break; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '557d4c4ecae080729e68df54ed2bd8420d0f037a'
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 18:47:44 2014 +0200| [137f7a630b5f91d6baa74a75cca8dd920107c4c6] | committer: Michael Niedermayer Merge commit '557d4c4ecae080729e68df54ed2bd8420d0f037a' * commit '557d4c4ecae080729e68df54ed2bd8420d0f037a': avconv: replace AVCodecContext.time_base with framerate Conflicts: ffmpeg.c Merged-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=137f7a630b5f91d6baa74a75cca8dd920107c4c6 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] rtpdec_hevc: Parse out of band vps/sps/pps/sei from fmtp lines
ffmpeg | branch: master | Martin Storsjö mar...@martin.st | Fri Oct 3 21:40:13 2014 +0300| [9b7f932ee568cadfc0f556a061fcc00cb63f9780] | committer: Martin Storsjö rtpdec_hevc: Parse out of band vps/sps/pps/sei from fmtp lines These are assembled into extradata in the order vps/sps/pps/sei. Signed-off-by: Martin Storsjö mar...@martin.st http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b7f932ee568cadfc0f556a061fcc00cb63f9780 --- libavformat/rtpdec_hevc.c | 99 - 1 file changed, 97 insertions(+), 2 deletions(-) diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c index 0ff30e2..1bf3c1a 100644 --- a/libavformat/rtpdec_hevc.c +++ b/libavformat/rtpdec_hevc.c @@ -21,6 +21,7 @@ */ #include libavutil/avstring.h +#include libavutil/base64.h #include avformat.h #include rtpdec.h @@ -34,6 +35,8 @@ struct PayloadContext { int using_donl_field; int profile_id; +uint8_t *sps, *pps, *vps, *sei; +int sps_size, pps_size, vps_size, sei_size; }; static const uint8_t start_sequence[] = { 0x00, 0x00, 0x00, 0x01 }; @@ -85,6 +88,65 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, /* sprop-sps: [base64] */ /* sprop-pps: [base64] */ /* sprop-sei: [base64] */ +if (!strcmp(attr, sprop-vps) || !strcmp(attr, sprop-sps) || +!strcmp(attr, sprop-pps) || !strcmp(attr, sprop-sei)) { +uint8_t **data_ptr; +int *size_ptr; +if (!strcmp(attr, sprop-vps)) { +data_ptr = hevc_data-vps; +size_ptr = hevc_data-vps_size; +} else if (!strcmp(attr, sprop-sps)) { +data_ptr = hevc_data-sps; +size_ptr = hevc_data-sps_size; +} else if (!strcmp(attr, sprop-pps)) { +data_ptr = hevc_data-pps; +size_ptr = hevc_data-pps_size; +} else if (!strcmp(attr, sprop-sei)) { +data_ptr = hevc_data-sei; +size_ptr = hevc_data-sei_size; +} + +while (*value) { +char base64packet[1024]; +uint8_t decoded_packet[1024]; +int packet_size; +char *dst = base64packet; + +while (*value *value != ',' + (dst - base64packet) sizeof(base64packet) - 1) { +*dst++ = *value++; +} +*dst++ = '\0'; + +if (*value == ',') +value++; + +packet_size = av_base64_decode(decoded_packet, base64packet, + sizeof(decoded_packet)); +if (packet_size 0) { +uint8_t *dest = av_malloc(packet_size + sizeof(start_sequence) + + *size_ptr); +if (!dest) { +av_log(s, AV_LOG_ERROR, + Unable to allocate memory for extradata!\n); +return AVERROR(ENOMEM); +} +if (*size_ptr) { +memcpy(dest, *data_ptr, *size_ptr); +av_free(*data_ptr); +} + +memcpy(dest + *size_ptr, start_sequence, + sizeof(start_sequence)); +memcpy(dest + *size_ptr + sizeof(start_sequence), + decoded_packet, packet_size); + +*data_ptr = dest; +*size_ptr += sizeof(start_sequence) + packet_size; +} +} +} + /* max-lsr, max-lps, max-cpb, max-dpb, max-br, max-tr, max-tc */ /* max-fps */ @@ -162,8 +224,41 @@ static av_cold int hevc_parse_sdp_line(AVFormatContext *ctx, int st_index, /* jump beyond the - and determine the height value */ codec-height = atoi(sdp_line_ptr + 1); } else if (av_strstart(sdp_line_ptr, fmtp:, sdp_line_ptr)) { -return ff_parse_fmtp(ctx, current_stream, hevc_data, sdp_line_ptr, - hevc_sdp_parse_fmtp_config); +int ret = ff_parse_fmtp(ctx, current_stream, hevc_data, sdp_line_ptr, +hevc_sdp_parse_fmtp_config); +if (hevc_data-vps_size || hevc_data-sps_size || +hevc_data-pps_size || hevc_data-sei_size) { +av_freep(codec-extradata); +codec-extradata_size = hevc_data-vps_size + hevc_data-sps_size + +hevc_data-pps_size + hevc_data-sei_size; +codec-extradata = av_malloc(codec-extradata_size + + FF_INPUT_BUFFER_PADDING_SIZE); +if (!codec-extradata) { +ret = AVERROR(ENOMEM); +codec-extradata_size = 0; +} else { +int pos = 0; +memcpy(codec-extradata + pos, hevc_data-vps, hevc_data-vps_size); +pos += hevc_data-vps_size; +memcpy(codec-extradata + pos, hevc_data-sps, hevc_data-sps_size); +pos +=
[FFmpeg-cvslog] Merge commit '9b7f932ee568cadfc0f556a061fcc00cb63f9780'
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 19:04:17 2014 +0200| [6afc319eee79d16e9abd75df4377af7dd4d6eb96] | committer: Michael Niedermayer Merge commit '9b7f932ee568cadfc0f556a061fcc00cb63f9780' * commit '9b7f932ee568cadfc0f556a061fcc00cb63f9780': rtpdec_hevc: Parse out of band vps/sps/pps/sei from fmtp lines Merged-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6afc319eee79d16e9abd75df4377af7dd4d6eb96 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] sdp: Provide out of bound parameter sets for HEVC if extradata is set
ffmpeg | branch: master | Martin Storsjö mar...@martin.st | Fri Oct 3 23:25:37 2014 +0300| [e5cfc8fdad901c9487fe896421972852f38bcf5b] | committer: Martin Storsjö sdp: Provide out of bound parameter sets for HEVC if extradata is set Signed-off-by: Martin Storsjö mar...@martin.st http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e5cfc8fdad901c9487fe896421972852f38bcf5b --- libavformat/sdp.c | 108 - 1 file changed, 106 insertions(+), 2 deletions(-) diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 43a50d4..a14a239 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -29,6 +29,7 @@ #include avformat.h #include internal.h #include avc.h +#include hevc.h #include rtp.h #if CONFIG_NETWORK #include network.h @@ -222,6 +223,107 @@ static char *extradata2psets(AVCodecContext *c) return psets; } +static char *extradata2psets_hevc(AVCodecContext *c) +{ +char *psets; +uint8_t *extradata = c-extradata; +int extradata_size = c-extradata_size; +uint8_t *tmpbuf = NULL; +int ps_pos[3] = { 0 }; +static const char * const ps_names[3] = { vps, sps, pps }; +int num_arrays, num_nalus; +int pos, i, j; + +// Convert to hvcc format. Since we need to group multiple NALUs of +// the same type, and we might need to convert from one format to the +// other anyway, we get away with a little less work by using the hvcc +// format. +if (c-extradata[0] != 1) { +AVIOContext *pb; +if (avio_open_dyn_buf(pb) 0) +return NULL; +if (ff_isom_write_hvcc(pb, c-extradata, c-extradata_size, 0) 0) { +avio_close_dyn_buf(pb, tmpbuf); +goto err; +} +extradata_size = avio_close_dyn_buf(pb, extradata); +tmpbuf = extradata; +} + +if (extradata_size 23) +goto err; + +num_arrays = extradata[22]; +pos = 23; +for (i = 0; i num_arrays; i++) { +int num_nalus, nalu_type; +if (pos + 3 extradata_size) +goto err; +nalu_type = extradata[pos] 0x3f; +// Not including libavcodec/hevc.h to avoid confusion between +// NAL_* with the same name for both H264 and HEVC. +if (nalu_type == 32) // VPS +ps_pos[0] = pos; +else if (nalu_type == 33) // SPS +ps_pos[1] = pos; +else if (nalu_type == 34) // PPS +ps_pos[2] = pos; +num_nalus = AV_RB16(extradata[pos + 1]); +pos += 3; +for (j = 0; j num_nalus; j++) { +int len; +if (pos + 2 extradata_size) +goto err; +len = AV_RB16(extradata[pos]); +pos += 2; +if (pos + len extradata_size) +goto err; +pos += len; +} +} +if (!ps_pos[0] || !ps_pos[1] || !ps_pos[2]) +goto err; + +psets = av_mallocz(MAX_PSET_SIZE); +if (!psets) +goto err; +psets[0] = '\0'; + +for (i = 0; i 3; i++) { +pos = ps_pos[i]; + +if (i 0) +av_strlcat(psets, ; , MAX_PSET_SIZE); +av_strlcatf(psets, MAX_PSET_SIZE, sprop-%s=, ps_names[i]); + +// Skipping boundary checks in the input here; we've already traversed +// the whole hvcc structure above without issues +num_nalus = AV_RB16(extradata[pos + 1]); +pos += 3; +for (j = 0; j num_nalus; j++) { +int len = AV_RB16(extradata[pos]); +int strpos; +pos += 2; +if (j 0) +av_strlcat(psets, ,, MAX_PSET_SIZE); +strpos = strlen(psets); +if (!av_base64_encode(psets + strpos, MAX_PSET_SIZE - strpos, + extradata[pos], len)) { +av_free(psets); +goto err; +} +pos += len; +} +} +av_free(tmpbuf); + +return psets; + +err: +av_free(tmpbuf); +return NULL; +} + static char *extradata2config(AVCodecContext *c) { char *config; @@ -412,9 +514,11 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, break; case AV_CODEC_ID_HEVC: if (c-extradata_size) -av_log(NULL, AV_LOG_WARNING, HEVC extradata not currently - passed properly through SDP\n); +config = extradata2psets_hevc(c); av_strlcatf(buff, size, a=rtpmap:%d H265/9\r\n, payload_type); +if (config) +av_strlcatf(buff, size, a=fmtp:%d %s\r\n, + payload_type, config); break; case AV_CODEC_ID_MPEG4: if (c-extradata_size) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'e5cfc8fdad901c9487fe896421972852f38bcf5'
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 19:11:45 2014 +0200| [a9ed4f1d156764ca4e38799db454990d15a9dd3d] | committer: Michael Niedermayer Merge commit 'e5cfc8fdad901c9487fe896421972852f38bcf5' * commit 'e5cfc8fdad901c9487fe896421972852f38bcf5': sdp: Provide out of bound parameter sets for HEVC if extradata is set Merged-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a9ed4f1d156764ca4e38799db454990d15a9dd3d --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] doc/filters: update link to OpenCV docs
ffmpeg | branch: master | Lou Logan l...@lrcd.com | Mon Oct 13 16:41:00 2014 -0800| [b629b421d7428fffbbff02367317cfd0aee7b778] | committer: Lou Logan doc/filters: update link to OpenCV docs Signed-off-by: Lou Logan l...@lrcd.com http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b629b421d7428fffbbff02367317cfd0aee7b778 --- doc/filters.texi |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index b9575f4..e9c1a24 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -6226,7 +6226,7 @@ values are assumed. Refer to the official libopencv documentation for more precise information: -@url{http://opencv.willowgarage.com/documentation/c/image_filtering.html} +@url{http://docs.opencv.org/master/modules/imgproc/doc/filtering.html} Several libopencv filters are supported; see the following subsections. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: fix some subtitles tests dependencies
ffmpeg | branch: master | Clément Bœsch u...@pkh.me | Sat Oct 11 14:05:49 2014 +0200| [b243393e8b4b0a24b21afc732697047c8b48fb58] | committer: Clément Bœsch fate: fix some subtitles tests dependencies http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b243393e8b4b0a24b21afc732697047c8b48fb58 --- tests/fate/subtitles.mak |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak index 2c6edc6..9243178 100644 --- a/tests/fate/subtitles.mak +++ b/tests/fate/subtitles.mak @@ -37,7 +37,7 @@ fate-sub-sami: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/SAMI_capability_test FATE_SUBTITLES_ASS-$(call DEMDEC, SRT, SUBRIP) += fate-sub-srt fate-sub-srt: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt -FATE_SUBTITLES-$(call ALLYES, MOV_DEMUXER MOVTEXT_DECODER SUBRIP_ENCODER) += fate-sub-subripenc +FATE_SUBTITLES-$(call ALLYES, MOV_DEMUXER MOVTEXT_DECODER SUBRIP_ENCODER SRT_MUXER) += fate-sub-subripenc fate-sub-subripenc: CMD = fmtstdout srt -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4 -scodec subrip FATE_SUBTITLES_ASS-$(call ALLYES, SUBVIEWER1_DEMUXER SUBVIEWER1_DECODER ICONV) += fate-sub-subviewer1 @@ -52,7 +52,7 @@ fate-sub-vplayer: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/VPlayer_capabilit FATE_SUBTITLES_ASS-$(call DEMDEC, WEBVTT, WEBVTT) += fate-sub-webvtt fate-sub-webvtt: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/WebVTT_capability_tester.vtt -FATE_SUBTITLES_ASS-$(call ENCMUX, WEBVTT, WEBVTT) += fate-sub-webvttenc +FATE_SUBTITLES-$(call ALLYES, SRT_DEMUXER SUBRIP_DECODER WEBVTT_ENCODER WEBVTT_MUXER) += fate-sub-webvttenc fate-sub-webvttenc: CMD = fmtstdout webvtt -i $(TARGET_SAMPLES)/sub/SubRip_capability_tester.srt FATE_SUBTITLES_ASS-$(call ALLYES, MICRODVD_DEMUXER MICRODVD_DECODER ICONV) += fate-sub-charenc ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ass: output missing fields in AVSubtitles and output files
ffmpeg | branch: master | Clément Bœsch u...@pkh.me | Sat Oct 11 14:31:23 2014 +0200| [40b9f28641b696c6bb73ce49dc97c2ce2700cbdb] | committer: Clément Bœsch avcodec/ass: output missing fields in AVSubtitles and output files Fixes Ticket #3207 http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40b9f28641b696c6bb73ce49dc97c2ce2700cbdb --- libavcodec/ass.c| 29 +-- libavcodec/version.h|2 +- tests/ref/fate/sub-aqtitle | 72 +- tests/ref/fate/sub-charenc | 106 +++ tests/ref/fate/sub-jacosub | 28 +-- tests/ref/fate/sub-microdvd | 28 +-- tests/ref/fate/sub-movtext | 12 ++--- tests/ref/fate/sub-mpl2 | 14 +++--- tests/ref/fate/sub-mpsub| 48 +- tests/ref/fate/sub-mpsub-frames | 10 ++-- tests/ref/fate/sub-pjs | 12 ++--- tests/ref/fate/sub-realtext | 16 +++--- tests/ref/fate/sub-sami | 24 - tests/ref/fate/sub-srt | 80 ++--- tests/ref/fate/sub-subviewer| 12 ++--- tests/ref/fate/sub-subviewer1 | 26 +- tests/ref/fate/sub-vplayer | 12 ++--- tests/ref/fate/sub-webvtt | 36 ++--- 18 files changed, 294 insertions(+), 273 deletions(-) diff --git a/libavcodec/ass.c b/libavcodec/ass.c index ba0593c..ac1bfae 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -39,11 +39,32 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, PlayResY: 288\r\n \r\n [V4+ Styles]\r\n - Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding\r\n - Style: Default,%s,%d,H%x,H%x,H%x,H%x,%d,%d,%d,1,1,0,%d,10,10,10,0,0\r\n + + /* ASSv4 header */ + Format: Name, + Fontname, Fontsize, + PrimaryColour, SecondaryColour, OutlineColour, BackColour, + Bold, Italic, Underline, StrikeOut, + ScaleX, ScaleY, + Spacing, Angle, + BorderStyle, Outline, Shadow, + Alignment, MarginL, MarginR, MarginV, + Encoding\r\n + + Style: + Default, /* Name */ + %s,%d, /* Font{name,size} */ + H%x,H%x,H%x,H%x, /* {Primary,Secondary,Outline,Back}Colour */ + %d,%d,%d,0, /* Bold, Italic, Underline, StrikeOut */ + 100,100, /* Scale{X,Y} */ + 0,0, /* Spacing, Angle */ + 1,1,0, /* BorderStyle, Outline, Shadow */ + %d,10,10,10, /* Alignment, Margin[LRV] */ + 0\r\n/* Encoding */ + \r\n [Events]\r\n - Format: Layer, Start, End, Style, Text\r\n, + Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n, font, font_size, color, color, back_color, back_color, -bold, -italic, -underline, alignment); @@ -104,7 +125,7 @@ int ff_ass_bprint_dialog(AVBPrint *buf, const char *dialog, insert_ts(buf, ts_start); insert_ts(buf, duration == -1 ? -1 : ts_start + duration); if (raw != 2) -av_bprintf(buf, Default,); +av_bprintf(buf, Default,,0,0,0,,); } dlen = strcspn(dialog, \n); diff --git a/libavcodec/version.h b/libavcodec/version.h index ab52d5c..1efe55c 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #include libavutil/version.h #define LIBAVCODEC_VERSION_MAJOR 56 -#define LIBAVCODEC_VERSION_MINOR 7 +#define LIBAVCODEC_VERSION_MINOR 8 #define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ diff --git a/tests/ref/fate/sub-aqtitle b/tests/ref/fate/sub-aqtitle index 16efca7..7c422c9 100644 --- a/tests/ref/fate/sub-aqtitle +++ b/tests/ref/fate/sub-aqtitle @@ -4,41 +4,41 @@ PlayResX: 384 PlayResY: 288 [V4+ Styles] -Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding -Style: Default,Arial,16,Hff,Hff,H0,H0,0,0,0,1,1,0,2,10,10,10,0,0 +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding +Style: Default,Arial,16,Hff,Hff,H0,H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0 [Events] -Format: Layer, Start, End, Style, Text -Dialogue: 0,0:03:29.92,0:03:31.28,Default,Dougu? -Dialogue:
[FFmpeg-cvslog] fate: add rawdiff and use it for subtitles
ffmpeg | branch: master | Clément Bœsch u...@pkh.me | Sat Oct 11 19:17:33 2014 +0200| [d97d4795fd2648d48fe3ed586472db630c2b5046] | committer: Clément Bœsch fate: add rawdiff and use it for subtitles We want subtitles tests to match exactly line endings and trailing characters. http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d97d4795fd2648d48fe3ed586472db630c2b5046 --- tests/fate-run.sh|1 + tests/fate/subtitles.mak |1 + 2 files changed, 2 insertions(+) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 224da8b..2f18fa3 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -229,6 +229,7 @@ fi if test -e $ref || test $cmp = oneline ; then case $cmp in diff) diff -u -b $ref $outfile$cmpfile ;; +rawdiff)diff -u$ref $outfile$cmpfile ;; oneoff) oneoff $ref $outfile$cmpfile ;; stddev) stddev $ref $outfile$cmpfile ;; oneline)oneline$ref $outfile$cmpfile ;; diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak index 0134752..2c6edc6 100644 --- a/tests/fate/subtitles.mak +++ b/tests/fate/subtitles.mak @@ -62,4 +62,5 @@ FATE_SUBTITLES-$(call ENCMUX, ASS, ASS) += $(FATE_SUBTITLES_ASS-yes) FATE_SUBTITLES += $(FATE_SUBTITLES-yes) FATE_SAMPLES_FFMPEG += $(FATE_SUBTITLES) +fate-subtitles: CMP = rawdiff fate-subtitles: $(FATE_SUBTITLES) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: make subtitles tests output to stdout instead of md5
ffmpeg | branch: master | Clément Bœsch u...@pkh.me | Sat Oct 11 13:55:55 2014 +0200| [8022bb1d9271f21167ecb4efc39ac17ca1612a1a] | committer: Clément Bœsch fate: make subtitles tests output to stdout instead of md5 This makes tracking subtitles changes simpler. http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8022bb1d9271f21167ecb4efc39ac17ca1612a1a --- tests/fate-run.sh |6 ++ tests/fate/subtitles.mak | 38 tests/ref/fate/sub-aqtitle| 45 +- tests/ref/fate/sub-charenc| 62 - tests/ref/fate/sub-jacosub| 23 - tests/ref/fate/sub-microdvd | 23 - tests/ref/fate/sub-microdvd-remux | Bin 33 - 436 bytes tests/ref/fate/sub-movtext| 15 +++- tests/ref/fate/sub-mpl2 | 16 +++- tests/ref/fate/sub-mpsub | 33 ++- tests/ref/fate/sub-mpsub-frames | 14 ++- tests/ref/fate/sub-pjs| 15 +++- tests/ref/fate/sub-realtext | 17 +++- tests/ref/fate/sub-sami | 21 - tests/ref/fate/sub-srt| 49 +- tests/ref/fate/sub-subripenc | 15 +++- tests/ref/fate/sub-subviewer | 15 +++- tests/ref/fate/sub-subviewer1 | 22 - tests/ref/fate/sub-vplayer| 15 +++- tests/ref/fate/sub-webvtt | 27 +- tests/ref/fate/sub-webvttenc | 178 - 21 files changed, 612 insertions(+), 37 deletions(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index b994aba..224da8b 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -114,6 +114,12 @@ pcm(){ ffmpeg $@ -vn -f s16le - } +fmtstdout(){ +fmt=$1 +shift 1 +ffmpeg $@ -f $fmt - +} + enc_dec_pcm(){ out_fmt=$1 dec_fmt=$2 diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak index 0c71882..0134752 100644 --- a/tests/fate/subtitles.mak +++ b/tests/fate/subtitles.mak @@ -1,62 +1,62 @@ FATE_SUBTITLES_ASS-$(call ALLYES, AQTITLE_DEMUXER TEXT_DECODER ICONV) += fate-sub-aqtitle -fate-sub-aqtitle: CMD = md5 -sub_charenc windows-1250 -i $(TARGET_SAMPLES)/sub/AQTitle_capability_tester.aqt -f ass +fate-sub-aqtitle: CMD = fmtstdout ass -sub_charenc windows-1250 -i $(TARGET_SAMPLES)/sub/AQTitle_capability_tester.aqt FATE_SUBTITLES_ASS-$(call DEMDEC, JACOSUB, JACOSUB) += fate-sub-jacosub -fate-sub-jacosub: CMD = md5 -i $(TARGET_SAMPLES)/sub/JACOsub_capability_tester.jss -f ass +fate-sub-jacosub: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/JACOsub_capability_tester.jss FATE_SUBTITLES_ASS-$(call DEMDEC, MICRODVD, MICRODVD) += fate-sub-microdvd -fate-sub-microdvd: CMD = md5 -i $(TARGET_SAMPLES)/sub/MicroDVD_capability_tester.sub -f ass +fate-sub-microdvd: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MicroDVD_capability_tester.sub FATE_SUBTITLES-$(call ALLYES, MICRODVD_DEMUXER MICRODVD_MUXER) += fate-sub-microdvd-remux -fate-sub-microdvd-remux: CMD = md5 -i $(TARGET_SAMPLES)/sub/MicroDVD_capability_tester.sub -c:s copy -f microdvd +fate-sub-microdvd-remux: CMD = fmtstdout microdvd -i $(TARGET_SAMPLES)/sub/MicroDVD_capability_tester.sub -c:s copy FATE_SUBTITLES_ASS-$(call DEMDEC, MOV, MOVTEXT) += fate-sub-movtext -fate-sub-movtext: CMD = md5 -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4 -f ass +fate-sub-movtext: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4 FATE_SUBTITLES-$(call ENCDEC, MOVTEXT, MOV) += fate-sub-movtextenc fate-sub-movtextenc: CMD = md5 -i $(TARGET_SAMPLES)/sub/MovText_capability_tester.mp4 -map 0 -scodec mov_text -f mp4 -flags +bitexact -movflags frag_keyframe+empty_moov FATE_SUBTITLES_ASS-$(call DEMDEC, MPL2, MPL2) += fate-sub-mpl2 -fate-sub-mpl2: CMD = md5 -i $(TARGET_SAMPLES)/sub/MPL2_capability_tester.txt -f ass +fate-sub-mpl2: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MPL2_capability_tester.txt FATE_SUBTITLES_ASS-$(call DEMDEC, MPSUB, TEXT) += fate-sub-mpsub -fate-sub-mpsub: CMD = md5 -i $(TARGET_SAMPLES)/sub/MPSub_capability_tester.sub -f ass +fate-sub-mpsub: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MPSub_capability_tester.sub FATE_SUBTITLES_ASS-$(call DEMDEC, MPSUB, TEXT) += fate-sub-mpsub-frames -fate-sub-mpsub-frames: CMD = md5 -i $(TARGET_SAMPLES)/sub/MPSub_capability_tester_frames.sub -f ass +fate-sub-mpsub-frames: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/MPSub_capability_tester_frames.sub FATE_SUBTITLES_ASS-$(call DEMDEC, PJS, PJS) += fate-sub-pjs -fate-sub-pjs: CMD = md5 -i $(TARGET_SAMPLES)/sub/PJS_capability_tester.pjs -f ass +fate-sub-pjs: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/PJS_capability_tester.pjs FATE_SUBTITLES_ASS-$(call DEMDEC, REALTEXT, REALTEXT) += fate-sub-realtext -fate-sub-realtext: CMD = md5 -i $(TARGET_SAMPLES)/sub/RealText_capability_tester.rt -f ass +fate-sub-realtext: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/RealText_capability_tester.rt FATE_SUBTITLES_ASS-$(call DEMDEC, SAMI, SAMI) += fate-sub-sami
[FFmpeg-cvslog] avcodec/ass_split: assume default order when Format: line is not found
ffmpeg | branch: master | Clément Bœsch u...@pkh.me | Sat Oct 11 16:12:51 2014 +0200| [3e86ead383c189d4eb41b3e4b33798eecf51a759] | committer: Clément Bœsch avcodec/ass_split: assume default order when Format: line is not found Fixes the decoding of the ASS stream in a mkv from a fansub release from Coalgirls. http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3e86ead383c189d4eb41b3e4b33798eecf51a759 --- libavcodec/ass_split.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index fea38e7..bd7db93 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -229,6 +229,20 @@ static inline const char *skip_space(const char *buf) return buf; } +static int *get_default_field_orders(const ASSSection *section) +{ +int i; +int *order = av_malloc(FF_ARRAY_ELEMS(section-fields) * sizeof(*order)); + +if (!order) +return NULL; +for (i = 0; section-fields[i].name; i++) +order[i] = i; +while (i FF_ARRAY_ELEMS(section-fields)) +order[i] = -1; +return order; +} + static const char *ass_split_section(ASSSplitContext *ctx, const char *buf) { const ASSSection *section = ass_sections[ctx-current_section]; @@ -246,7 +260,7 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf) } else if (section-format_header !order) { len = strlen(section-format_header); if (strncmp(buf, section-format_header, len) || buf[len] != ':') -return NULL; +goto next_line; buf += len + 1; while (!is_eol(*buf)) { buf = skip_space(buf); @@ -269,6 +283,15 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf) if (!strncmp(buf, section-fields_header, len) buf[len] == ':') { uint8_t *ptr, *struct_ptr = realloc_section_array(ctx); if (!struct_ptr) return NULL; + +/* No format header line found so far, assume default */ +if (!order) { +order = get_default_field_orders(section); +if (!order) +return NULL; +ctx-field_order[ctx-current_section] = order; +} + buf += len + 1; for (i=0; !is_eol(*buf) i *number; i++) { int last = i == *number - 1; @@ -298,6 +321,7 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf) } } } +next_line: buf += strcspn(buf, \n); buf += !!*buf; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ass: add FFmpeg signature
ffmpeg | branch: master | Clément Bœsch u...@pkh.me | Sat Oct 11 18:37:43 2014 +0200| [52b0a0ecaa02e17f7e01bead8c3f215f1cfd48dc] | committer: Clément Bœsch avcodec/ass: add FFmpeg signature http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=52b0a0ecaa02e17f7e01bead8c3f215f1cfd48dc --- libavcodec/ass.c|2 ++ tests/fate-run.sh |2 +- tests/ref/fate/sub-aqtitle |1 + tests/ref/fate/sub-charenc |1 + tests/ref/fate/sub-jacosub |1 + tests/ref/fate/sub-microdvd |1 + tests/ref/fate/sub-movtext |1 + tests/ref/fate/sub-mpl2 |1 + tests/ref/fate/sub-mpsub|1 + tests/ref/fate/sub-mpsub-frames |1 + tests/ref/fate/sub-pjs |1 + tests/ref/fate/sub-realtext |1 + tests/ref/fate/sub-sami |1 + tests/ref/fate/sub-srt |1 + tests/ref/fate/sub-subviewer|1 + tests/ref/fate/sub-subviewer1 |1 + tests/ref/fate/sub-vplayer |1 + tests/ref/fate/sub-webvtt |1 + 18 files changed, 19 insertions(+), 1 deletion(-) diff --git a/libavcodec/ass.c b/libavcodec/ass.c index ac1bfae..fd00981 100644 --- a/libavcodec/ass.c +++ b/libavcodec/ass.c @@ -34,6 +34,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, { avctx-subtitle_header = av_asprintf( [Script Info]\r\n + ; Script generated by FFmpeg/Lavc%s\r\n ScriptType: v4.00+\r\n PlayResX: 384\r\n PlayResY: 288\r\n @@ -65,6 +66,7 @@ int ff_ass_subtitle_header(AVCodecContext *avctx, \r\n [Events]\r\n Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\r\n, + !(avctx-flags CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : , font, font_size, color, color, back_color, back_color, -bold, -italic, -underline, alignment); diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 2f18fa3..f00a0be 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -117,7 +117,7 @@ pcm(){ fmtstdout(){ fmt=$1 shift 1 -ffmpeg $@ -f $fmt - +ffmpeg -flags +bitexact $@ -f $fmt - } enc_dec_pcm(){ diff --git a/tests/ref/fate/sub-aqtitle b/tests/ref/fate/sub-aqtitle index 7c422c9..87253c9 100644 --- a/tests/ref/fate/sub-aqtitle +++ b/tests/ref/fate/sub-aqtitle @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-charenc b/tests/ref/fate/sub-charenc index 199653a..ed5cdbe 100644 --- a/tests/ref/fate/sub-charenc +++ b/tests/ref/fate/sub-charenc @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-jacosub b/tests/ref/fate/sub-jacosub index 4e719f6..a30fe4a 100644 --- a/tests/ref/fate/sub-jacosub +++ b/tests/ref/fate/sub-jacosub @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-microdvd b/tests/ref/fate/sub-microdvd index 73f17bb..f0eb331 100644 --- a/tests/ref/fate/sub-microdvd +++ b/tests/ref/fate/sub-microdvd @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-movtext b/tests/ref/fate/sub-movtext index 8c573ef..6a90e96 100644 --- a/tests/ref/fate/sub-movtext +++ b/tests/ref/fate/sub-movtext @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-mpl2 b/tests/ref/fate/sub-mpl2 index 7529e5b..72fc0fc 100644 --- a/tests/ref/fate/sub-mpl2 +++ b/tests/ref/fate/sub-mpl2 @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-mpsub b/tests/ref/fate/sub-mpsub index fffc3c4..890ceb0 100644 --- a/tests/ref/fate/sub-mpsub +++ b/tests/ref/fate/sub-mpsub @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-mpsub-frames b/tests/ref/fate/sub-mpsub-frames index 3d8ac5a..64528ec 100644 --- a/tests/ref/fate/sub-mpsub-frames +++ b/tests/ref/fate/sub-mpsub-frames @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-pjs b/tests/ref/fate/sub-pjs index 36f3fe5..799c62b 100644 --- a/tests/ref/fate/sub-pjs +++ b/tests/ref/fate/sub-pjs @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc ScriptType: v4.00+ PlayResX: 384 PlayResY: 288 diff --git a/tests/ref/fate/sub-realtext b/tests/ref/fate/sub-realtext index 6c67acd..cd9aa5a 100644 --- a/tests/ref/fate/sub-realtext +++ b/tests/ref/fate/sub-realtext @@ -1,4 +1,5 @@ [Script Info] +; Script generated by FFmpeg/Lavc
[FFmpeg-cvslog] avformat/assdec: typo fix
ffmpeg | branch: master | Clément Bœsch u...@pkh.me | Sat Oct 11 20:14:37 2014 +0200| [d281a87ae37be5338e667b43a5600511ec297815] | committer: Clément Bœsch avformat/assdec: typo fix http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d281a87ae37be5338e667b43a5600511ec297815 --- libavformat/assdec.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/assdec.c b/libavformat/assdec.c index 87ce2f2..ccbf4c0 100644 --- a/libavformat/assdec.c +++ b/libavformat/assdec.c @@ -68,7 +68,7 @@ static int read_dialogue(ASSContext *ass, AVBPrint *dst, const uint8_t *p, /* This is not part of the sscanf itself in order to handle an actual * number (which would be the Layer) or the form Marked=N (which is - * the old SSA field, now replaced by Layer, and will be lead to Layer + * the old SSA field, now replaced by Layer, and will lead to Layer * being 0 here). */ const int layer = atoi(p + 10); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/ass_split: extend recognized fields in ASS splitter
ffmpeg | branch: master | Clément Bœsch u...@pkh.me | Sat Oct 11 16:10:51 2014 +0200| [d9f272fe33063350127d1d6632804f4f0fd8dd9c] | committer: Clément Bœsch avcodec/ass_split: extend recognized fields in ASS splitter This simplifies the logic for the fix in the next commit. http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d9f272fe33063350127d1d6632804f4f0fd8dd9c --- libavcodec/ass_split.c | 31 ++- libavcodec/ass_split.h | 20 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index 413e9c8..fea38e7 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -44,7 +44,7 @@ typedef struct { int size; int offset; int offset_count; -ASSFields fields[10]; +ASSFields fields[24]; } ASSSection; static const ASSSection ass_sections[] = { @@ -68,11 +68,25 @@ static const ASSSection ass_sections[] = { {Fontname, ASS_STR, offsetof(ASSStyle, font_name)}, {Fontsize, ASS_INT, offsetof(ASSStyle, font_size)}, {PrimaryColour,ASS_COLOR,offsetof(ASSStyle, primary_color)}, + {SecondaryColour,ASS_COLOR,offsetof(ASSStyle, secondary_color)}, + {OutlineColour,ASS_COLOR,offsetof(ASSStyle, outline_color)}, {BackColour, ASS_COLOR,offsetof(ASSStyle, back_color) }, {Bold, ASS_INT, offsetof(ASSStyle, bold) }, {Italic, ASS_INT, offsetof(ASSStyle, italic) }, {Underline,ASS_INT, offsetof(ASSStyle, underline)}, + {StrikeOut,ASS_INT, offsetof(ASSStyle, strikeout)}, + {ScaleX, ASS_FLT, offsetof(ASSStyle, scalex) }, + {ScaleY, ASS_FLT, offsetof(ASSStyle, scaley) }, + {Spacing, ASS_FLT, offsetof(ASSStyle, spacing) }, + {Angle,ASS_FLT, offsetof(ASSStyle, angle)}, + {BorderStyle, ASS_INT, offsetof(ASSStyle, border_style) }, + {Outline, ASS_FLT, offsetof(ASSStyle, outline) }, + {Shadow, ASS_FLT, offsetof(ASSStyle, shadow) }, {Alignment,ASS_INT, offsetof(ASSStyle, alignment)}, + {MarginL, ASS_INT, offsetof(ASSStyle, margin_l) }, + {MarginR, ASS_INT, offsetof(ASSStyle, margin_r) }, + {MarginV, ASS_INT, offsetof(ASSStyle, margin_v) }, + {Encoding, ASS_INT, offsetof(ASSStyle, encoding) }, {0}, } }, @@ -86,10 +100,20 @@ static const ASSSection ass_sections[] = { {Fontname, ASS_STR, offsetof(ASSStyle, font_name)}, {Fontsize, ASS_INT, offsetof(ASSStyle, font_size)}, {PrimaryColour,ASS_COLOR,offsetof(ASSStyle, primary_color)}, + {SecondaryColour, ASS_COLOR, offsetof(ASSStyle, secondary_color) }, + {TertiaryColour, ASS_COLOR, offsetof(ASSStyle, outline_color) }, {BackColour, ASS_COLOR,offsetof(ASSStyle, back_color) }, {Bold, ASS_INT, offsetof(ASSStyle, bold) }, {Italic, ASS_INT, offsetof(ASSStyle, italic) }, + {BorderStyle, ASS_INT, offsetof(ASSStyle, border_style) }, + {Outline, ASS_FLT, offsetof(ASSStyle, outline) }, + {Shadow, ASS_FLT, offsetof(ASSStyle, shadow) }, {Alignment,ASS_ALGN, offsetof(ASSStyle, alignment)}, + {MarginL, ASS_INT, offsetof(ASSStyle, margin_l) }, + {MarginR, ASS_INT, offsetof(ASSStyle, margin_r) }, + {MarginV, ASS_INT, offsetof(ASSStyle, margin_v) }, + {AlphaLevel, ASS_INT, offsetof(ASSStyle, alpha_level) }, + {Encoding, ASS_INT, offsetof(ASSStyle, encoding) }, {0}, } }, @@ -103,6 +127,11 @@ static const ASSSection ass_sections[] = { {Start, ASS_TIMESTAMP, offsetof(ASSDialog, start) }, {End,ASS_TIMESTAMP, offsetof(ASSDialog, end) }, {Style, ASS_STR,offsetof(ASSDialog, style) }, + {Name, ASS_STR,offsetof(ASSDialog, name)}, + {MarginL, ASS_INT, offsetof(ASSDialog, margin_l)}, + {MarginR, ASS_INT, offsetof(ASSDialog, margin_r)}, + {MarginV, ASS_INT, offsetof(ASSDialog, margin_v)}, + {Effect, ASS_STR, offsetof(ASSDialog, effect) }, {Text, ASS_STR,
[FFmpeg-cvslog] avcodec/ass_split: realign after addition of new fields
ffmpeg | branch: master | Clément Bœsch u...@pkh.me | Sat Oct 11 20:16:43 2014 +0200| [462f2876ce41f27000da3c23441a0a086f290499] | committer: Clément Bœsch avcodec/ass_split: realign after addition of new fields http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=462f2876ce41f27000da3c23441a0a086f290499 --- libavcodec/ass_split.c | 102 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index bd7db93..cc4f961 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -64,29 +64,29 @@ static const ASSSection ass_sections[] = { .size = sizeof(ASSStyle), .offset= offsetof(ASS, styles), .offset_count = offsetof(ASS, styles_count), - .fields = {{Name, ASS_STR, offsetof(ASSStyle, name) }, - {Fontname, ASS_STR, offsetof(ASSStyle, font_name)}, - {Fontsize, ASS_INT, offsetof(ASSStyle, font_size)}, - {PrimaryColour,ASS_COLOR,offsetof(ASSStyle, primary_color)}, - {SecondaryColour,ASS_COLOR,offsetof(ASSStyle, secondary_color)}, - {OutlineColour,ASS_COLOR,offsetof(ASSStyle, outline_color)}, - {BackColour, ASS_COLOR,offsetof(ASSStyle, back_color) }, - {Bold, ASS_INT, offsetof(ASSStyle, bold) }, - {Italic, ASS_INT, offsetof(ASSStyle, italic) }, - {Underline,ASS_INT, offsetof(ASSStyle, underline)}, - {StrikeOut,ASS_INT, offsetof(ASSStyle, strikeout)}, - {ScaleX, ASS_FLT, offsetof(ASSStyle, scalex) }, - {ScaleY, ASS_FLT, offsetof(ASSStyle, scaley) }, - {Spacing, ASS_FLT, offsetof(ASSStyle, spacing) }, - {Angle,ASS_FLT, offsetof(ASSStyle, angle)}, - {BorderStyle, ASS_INT, offsetof(ASSStyle, border_style) }, - {Outline, ASS_FLT, offsetof(ASSStyle, outline) }, - {Shadow, ASS_FLT, offsetof(ASSStyle, shadow) }, - {Alignment,ASS_INT, offsetof(ASSStyle, alignment)}, - {MarginL, ASS_INT, offsetof(ASSStyle, margin_l) }, - {MarginR, ASS_INT, offsetof(ASSStyle, margin_r) }, - {MarginV, ASS_INT, offsetof(ASSStyle, margin_v) }, - {Encoding, ASS_INT, offsetof(ASSStyle, encoding) }, + .fields = {{Name,ASS_STR, offsetof(ASSStyle, name) }, + {Fontname,ASS_STR, offsetof(ASSStyle, font_name) }, + {Fontsize,ASS_INT, offsetof(ASSStyle, font_size) }, + {PrimaryColour, ASS_COLOR, offsetof(ASSStyle, primary_color) }, + {SecondaryColour, ASS_COLOR, offsetof(ASSStyle, secondary_color)}, + {OutlineColour, ASS_COLOR, offsetof(ASSStyle, outline_color) }, + {BackColour, ASS_COLOR, offsetof(ASSStyle, back_color) }, + {Bold,ASS_INT, offsetof(ASSStyle, bold) }, + {Italic, ASS_INT, offsetof(ASSStyle, italic) }, + {Underline, ASS_INT, offsetof(ASSStyle, underline) }, + {StrikeOut, ASS_INT, offsetof(ASSStyle, strikeout) }, + {ScaleX, ASS_FLT, offsetof(ASSStyle, scalex) }, + {ScaleY, ASS_FLT, offsetof(ASSStyle, scaley) }, + {Spacing, ASS_FLT, offsetof(ASSStyle, spacing) }, + {Angle, ASS_FLT, offsetof(ASSStyle, angle) }, + {BorderStyle, ASS_INT, offsetof(ASSStyle, border_style) }, + {Outline, ASS_FLT, offsetof(ASSStyle, outline) }, + {Shadow, ASS_FLT, offsetof(ASSStyle, shadow) }, + {Alignment, ASS_INT, offsetof(ASSStyle, alignment) }, + {MarginL, ASS_INT, offsetof(ASSStyle, margin_l) }, + {MarginR, ASS_INT, offsetof(ASSStyle, margin_r) }, + {MarginV, ASS_INT, offsetof(ASSStyle, margin_v) }, + {Encoding,ASS_INT, offsetof(ASSStyle, encoding) }, {0}, } }, @@ -96,24 +96,24 @@ static const ASSSection ass_sections[] = { .size = sizeof(ASSStyle), .offset= offsetof(ASS, styles), .offset_count = offsetof(ASS, styles_count), - .fields = {{Name, ASS_STR, offsetof(ASSStyle, name) }, - {Fontname, ASS_STR, offsetof(ASSStyle,
[FFmpeg-cvslog] avformat/rtsp: check memory allocation
ffmpeg | branch: master | Michael Lynch mtly...@google.com | Tue Oct 14 16:30:39 2014 -0400| [c69f230a3afbfa30d7a978a6961b1ddcc774499f] | committer: Michael Niedermayer avformat/rtsp: check memory allocation Reviewed-by: Reimar Döffinger reimar.doeffin...@gmx.de Commit message by: Benoit Fouet benoit.fo...@free.fr Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c69f230a3afbfa30d7a978a6961b1ddcc774499f --- libavformat/rtsp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 523a7c0..77f03ba 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1150,6 +1150,8 @@ start: if (content_length 0) { /* leave some room for a trailing '\0' (useful for simple parsing) */ content = av_malloc(content_length + 1); +if (!content) +return AVERROR(ENOMEM); ffurl_read_complete(rt-rtsp_hd, content, content_length); content[content_length] = '\0'; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/mov: auodetect use_mfra_for
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Mon Oct 13 13:35:33 2014 +0200| [1b54e6b12bcf3090266ea632e52e8f8fe946397b] | committer: Michael Niedermayer avformat/mov: auodetect use_mfra_for Reviewed-by: Mika Raento mi...@iki.fi Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1b54e6b12bcf3090266ea632e52e8f8fe946397b --- libavformat/isom.h |1 + libavformat/mov.c | 29 +++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/libavformat/isom.h b/libavformat/isom.h index 343cdd3..52da1a3 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -254,6 +254,7 @@ enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags); int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries); void ff_mov_write_chan(AVIOContext *pb, int64_t channel_layout); +#define FF_MOV_FLAG_MFRA_AUTO -1 #define FF_MOV_FLAG_MFRA_DTS 1 #define FF_MOV_FLAG_MFRA_PTS 2 diff --git a/libavformat/mov.c b/libavformat/mov.c index 7393cb7..69a61fb 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3270,6 +3270,28 @@ static int mov_read_uuid(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; } +static int mov_read_free(MOVContext *c, AVIOContext *pb, MOVAtom atom) +{ +int ret; +uint8_t content[16]; + +if (atom.size 8) +return 0; + +ret = avio_read(pb, content, FFMIN(sizeof(content), atom.size)); +if (ret 0) +return ret; + +if ( !c-found_moov + !c-found_mdat + !memcmp(content, Anevia\x1A\x1A, 8) + c-use_mfra_for == FF_MOV_FLAG_MFRA_AUTO) { +c-use_mfra_for = FF_MOV_FLAG_MFRA_PTS; +} + +return 0; +} + static const MOVParseTableEntry mov_default_parse_table[] = { { MKTAG('A','C','L','R'), mov_read_avid }, { MKTAG('A','P','R','G'), mov_read_avid }, @@ -3338,6 +3360,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = { { MKTAG('h','v','c','C'), mov_read_glbl }, { MKTAG('u','u','i','d'), mov_read_uuid }, { MKTAG('C','i','n', 0x8e), mov_read_targa_y216 }, +{ MKTAG('f','r','e','e'), mov_read_free }, { MKTAG('-','-','-','-'), mov_read_custom }, { 0, NULL } }; @@ -4144,9 +4167,11 @@ static const AVOption options[] = { 0, 1, AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_DECODING_PARAM}, {use_mfra_for, use mfra for fragment timestamps, -offsetof(MOVContext, use_mfra_for), FF_OPT_TYPE_INT, {.i64 = 0}, -0, FF_MOV_FLAG_MFRA_PTS, AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_DECODING_PARAM, +offsetof(MOVContext, use_mfra_for), FF_OPT_TYPE_INT, {.i64 = FF_MOV_FLAG_MFRA_AUTO}, +-1, FF_MOV_FLAG_MFRA_PTS, AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_DECODING_PARAM, use_mfra_for}, +{auto, auto, 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_MFRA_AUTO}, 0, 0, +AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_DECODING_PARAM, use_mfra_for }, {dts, dts, 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_MFRA_DTS}, 0, 0, AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_DECODING_PARAM, use_mfra_for }, {pts, pts, 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_MFRA_PTS}, 0, 0, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] build: mov_muxer requires ac3_parser
ffmpeg | branch: master | Yu Xiaolei dreifachst...@gmail.com | Wed Oct 15 13:33:39 2014 +0800| [8091fe3071db996110c2732f2446701a6d7544bc] | committer: Michael Niedermayer build: mov_muxer requires ac3_parser Reviewed-by: Benoit Fouet benoit.fo...@free.fr Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8091fe3071db996110c2732f2446701a6d7544bc --- configure |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index cda463d..3e7143c 100755 --- a/configure +++ b/configure @@ -2413,7 +2413,7 @@ matroska_muxer_select=riffenc mmf_muxer_select=riffenc mov_demuxer_select=riffdec mov_demuxer_suggest=zlib -mov_muxer_select=riffenc rtpenc_chain +mov_muxer_select=riffenc rtpenc_chain ac3_parser mp3_demuxer_select=mpegaudio_parser mp4_muxer_select=mov_muxer mpegts_muxer_select=adts_muxer latm_muxer ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '74b02377980321934e33969c84733ace7e9f4eeb'
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Wed Oct 15 21:39:50 2014 +0200| [16f9f7b881d2025e47c73fc30dbe5cc47109a711] | committer: Michael Niedermayer Merge commit '74b02377980321934e33969c84733ace7e9f4eeb' * commit '74b02377980321934e33969c84733ace7e9f4eeb': mov: Correctly check the color transfer characteristics range Merged-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=16f9f7b881d2025e47c73fc30dbe5cc47109a711 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] rtpdec_hevc: Rename a variable for clarity
ffmpeg | branch: master | Martin Storsjö mar...@martin.st | Wed Oct 15 16:14:28 2014 +0300| [752e71e74f50e7a6f9a19edb8e775b2ea2fb94d8] | committer: Martin Storsjö rtpdec_hevc: Rename a variable for clarity Signed-off-by: Martin Storsjö mar...@martin.st http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=752e71e74f50e7a6f9a19edb8e775b2ea2fb94d8 --- libavformat/rtpdec_hevc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c index 1bf3c1a..72bf775 100644 --- a/libavformat/rtpdec_hevc.c +++ b/libavformat/rtpdec_hevc.c @@ -109,7 +109,7 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, while (*value) { char base64packet[1024]; uint8_t decoded_packet[1024]; -int packet_size; +int decoded_packet_size; char *dst = base64packet; while (*value *value != ',' @@ -121,11 +121,11 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, if (*value == ',') value++; -packet_size = av_base64_decode(decoded_packet, base64packet, - sizeof(decoded_packet)); -if (packet_size 0) { -uint8_t *dest = av_malloc(packet_size + sizeof(start_sequence) + - *size_ptr); +decoded_packet_size = av_base64_decode(decoded_packet, base64packet, + sizeof(decoded_packet)); +if (decoded_packet_size 0) { +uint8_t *dest = av_malloc(decoded_packet_size + + sizeof(start_sequence) + *size_ptr); if (!dest) { av_log(s, AV_LOG_ERROR, Unable to allocate memory for extradata!\n); @@ -139,10 +139,10 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, memcpy(dest + *size_ptr, start_sequence, sizeof(start_sequence)); memcpy(dest + *size_ptr + sizeof(start_sequence), - decoded_packet, packet_size); + decoded_packet, decoded_packet_size); *data_ptr = dest; -*size_ptr += sizeof(start_sequence) + packet_size; +*size_ptr += sizeof(start_sequence) + decoded_packet_size; } } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] rtpdec_hevc: Use av_realloc instead of av_malloc+memcpy
ffmpeg | branch: master | Martin Storsjö mar...@martin.st | Wed Oct 15 16:21:27 2014 +0300| [ced7238cd01cc2199acf9225305628641a27c1d7] | committer: Martin Storsjö rtpdec_hevc: Use av_realloc instead of av_malloc+memcpy Signed-off-by: Martin Storsjö mar...@martin.st http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ced7238cd01cc2199acf9225305628641a27c1d7 --- libavformat/rtpdec_hevc.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c index 72bf775..49789b0 100644 --- a/libavformat/rtpdec_hevc.c +++ b/libavformat/rtpdec_hevc.c @@ -124,24 +124,20 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, decoded_packet_size = av_base64_decode(decoded_packet, base64packet, sizeof(decoded_packet)); if (decoded_packet_size 0) { -uint8_t *dest = av_malloc(decoded_packet_size + +uint8_t *tmp = av_realloc(*data_ptr, decoded_packet_size + sizeof(start_sequence) + *size_ptr); -if (!dest) { +if (!tmp) { av_log(s, AV_LOG_ERROR, Unable to allocate memory for extradata!\n); return AVERROR(ENOMEM); } -if (*size_ptr) { -memcpy(dest, *data_ptr, *size_ptr); -av_free(*data_ptr); -} +*data_ptr = tmp; -memcpy(dest + *size_ptr, start_sequence, +memcpy(*data_ptr + *size_ptr, start_sequence, sizeof(start_sequence)); -memcpy(dest + *size_ptr + sizeof(start_sequence), +memcpy(*data_ptr + *size_ptr + sizeof(start_sequence), decoded_packet, decoded_packet_size); -*data_ptr = dest; *size_ptr += sizeof(start_sequence) + decoded_packet_size; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] rtmpproto: Fix a typo
ffmpeg | branch: master | Martin Storsjö mar...@martin.st | Wed Oct 15 13:41:33 2014 +0300| [79dd756e143a54efc25d64e90505f0dca6cbc4ec] | committer: Martin Storsjö rtmpproto: Fix a typo Signed-off-by: Martin Storsjö mar...@martin.st http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=79dd756e143a54efc25d64e90505f0dca6cbc4ec --- libavformat/rtmpproto.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 4aaa420..ea15ccb 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -505,7 +505,7 @@ static int read_connect(URLContext *s, RTMPContext *rt) if (ret 0) return ret; -// Send result_ NetConnection.Connect.Success to connect +// Send _result NetConnection.Connect.Success to connect if ((ret = ff_rtmp_packet_create(pkt, RTMP_SYSTEM_CHANNEL, RTMP_PT_INVOKE, 0, RTMP_PKTDATA_DEFAULT_SIZE)) 0) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/avcodec: more verbose documentation for time_base
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Thu Oct 16 00:13:45 2014 +0200| [7b6a97edd1b50c03ec9b30f5806a72036923bee4] | committer: Michael Niedermayer avcodec/avcodec: more verbose documentation for time_base Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b6a97edd1b50c03ec9b30f5806a72036923bee4 --- libavcodec/avcodec.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index cb0e744..3d6f7b9 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1346,6 +1346,8 @@ typedef struct AVCodecContext { * of which frame timestamps are represented. For fixed-fps content, * timebase should be 1/framerate and timestamp increments should be * identically 1. + * This often, but not always is the inverse of the frame rate or field rate + * for video. * - encoding: MUST be set by user. * - decoding: the use of this field for decoding is deprecated. * Use framerate instead. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/oggparsedirac: use AVCodecContext.framerate
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Thu Oct 16 00:29:14 2014 +0200| [46f52274f38d61102bba38961a02b1938003a514] | committer: Michael Niedermayer avformat/oggparsedirac: use AVCodecContext.framerate Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=46f52274f38d61102bba38961a02b1938003a514 --- libavformat/oggparsedirac.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/oggparsedirac.c b/libavformat/oggparsedirac.c index 73bc495..10fb07e 100644 --- a/libavformat/oggparsedirac.c +++ b/libavformat/oggparsedirac.c @@ -43,7 +43,7 @@ static int dirac_header(AVFormatContext *s, int idx) st-codec-codec_type = AVMEDIA_TYPE_VIDEO; st-codec-codec_id = AV_CODEC_ID_DIRAC; // dirac in ogg always stores timestamps as though the video were interlaced -avpriv_set_pts_info(st, 64, st-codec-time_base.num, 2*st-codec-time_base.den); +avpriv_set_pts_info(st, 64, st-codec-framerate.den, 2*st-codec-framerate.num); return 1; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/util: Simplify av_guess_frame_rate() by using AVCodecContext.framerate
ffmpeg | branch: master | Michael Niedermayer michae...@gmx.at | Thu Oct 16 01:53:43 2014 +0200| [d267a0f8c1a8f950abe0043dc7b9b29835ed1dc2] | committer: Michael Niedermayer avformat/util: Simplify av_guess_frame_rate() by using AVCodecContext.framerate Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d267a0f8c1a8f950abe0043dc7b9b29835ed1dc2 --- libavformat/utils.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index a50d6f4..7919cc4 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -4104,7 +4104,7 @@ AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *strea AVRational av_guess_frame_rate(AVFormatContext *format, AVStream *st, AVFrame *frame) { AVRational fr = st-r_frame_rate; -AVRational codec_fr = av_inv_q(st-codec-time_base); +AVRational codec_fr = st-codec-framerate; AVRational avg_fr = st-avg_frame_rate; if (avg_fr.num 0 avg_fr.den 0 fr.num 0 fr.den 0 @@ -4114,7 +4114,6 @@ AVRational av_guess_frame_rate(AVFormatContext *format, AVStream *st, AVFrame *f if (st-codec-ticks_per_frame 1) { -codec_fr.den *= st-codec-ticks_per_frame; if ( codec_fr.num 0 codec_fr.den 0 av_q2d(codec_fr) av_q2d(fr)*0.7 fabs(1.0 - av_q2d(av_div_q(avg_fr, fr))) 0.1) fr = codec_fr; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpegts: add the judgement if a new program is created successfully
ffmpeg | branch: master | Di Wu di1028...@samsung.com | Wed Oct 15 16:24:21 2014 +0800| [0e406aba14a89e94b31afde02b6bc0f456b113f5] | committer: Michael Niedermayer mpegts: add the judgement if a new program is created successfully Add the judement after create a new program to avoid segment fault. Signed-off-by: Di Wu di1028...@samsung.com Reviewed-by: Marton Balint c...@passwd.hu Signed-off-by: Michael Niedermayer michae...@gmx.at http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0e406aba14a89e94b31afde02b6bc0f456b113f5 --- libavformat/mpegts.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 8808269..cc0ce79 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1925,8 +1925,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len } else { MpegTSFilter *fil = ts-pids[pmt_pid]; program = av_new_program(ts-stream, sid); -program-program_num = sid; -program-pmt_pid = pmt_pid; +if (program) { +program-program_num = sid; +program-pmt_pid = pmt_pid; +} if (fil) if ( fil-type != MPEGTS_SECTION || fil-pid != pmt_pid ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog