Re: [FFmpeg-devel] [PATCH] avformat_alloc_context: initialize raw_packet_buffer_remaining_size.

2015-05-10 Thread Reimar Döffinger
On Sat, May 09, 2015 at 11:41:17PM +0200, Michael Niedermayer wrote:
> On Sat, May 09, 2015 at 08:57:26PM +0200, Reimar Döffinger wrote:
> > This currently works for most users because
> > avformat_open_input sets it, but this patch fixes any
> > applications not using that function.
> > 
> > Signed-off-by: Reimar Döffinger 
> > ---
> >  libavformat/options.c | 1 +
> >  1 file changed, 1 insertion(+)
> 
> LGTM

Thanks, pushed.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 2/2] avformat/mxf: Always evaluate PRINT_KEY() arguments at compile time

2015-05-10 Thread Michael Niedermayer
On Thu, May 07, 2015 at 03:48:26AM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/mxf.h |   10 +-
>  1 file changed, 9 insertions(+), 1 deletion(-)

applied

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] avformat/mxf: Simplify PRINT_KEY()

2015-05-10 Thread Michael Niedermayer
On Thu, May 07, 2015 at 03:48:25AM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/mxf.h |   12 ++--
>  1 file changed, 2 insertions(+), 10 deletions(-)

applied

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] avformat/subtitles: Use size_t for len

2015-05-10 Thread Michael Niedermayer
string length could theoretically be larger than int

Signed-off-by: Michael Niedermayer 
---
 libavformat/subtitles.c |4 ++--
 libavformat/subtitles.h |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c
index 67624fc..5bdbc8d 100644
--- a/libavformat/subtitles.c
+++ b/libavformat/subtitles.c
@@ -109,7 +109,7 @@ int ff_text_peek_r8(FFTextReader *r)
 }
 
 AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q,
-const uint8_t *event, int len, int merge)
+const uint8_t *event, size_t len, int 
merge)
 {
 AVPacket *subs, *sub;
 
@@ -303,7 +303,7 @@ int ff_smil_extract_next_text_chunk(FFTextReader *tr, 
AVBPrint *buf, char *c)
 const char *ff_smil_get_attr_ptr(const char *s, const char *attr)
 {
 int in_quotes = 0;
-const int len = strlen(attr);
+const size_t len = strlen(attr);
 
 while (*s) {
 while (*s) {
diff --git a/libavformat/subtitles.h b/libavformat/subtitles.h
index eb719ea..885285c 100644
--- a/libavformat/subtitles.h
+++ b/libavformat/subtitles.h
@@ -116,7 +116,7 @@ typedef struct {
  *  previous one instead of adding a new entry, 0 otherwise
  */
 AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q,
-const uint8_t *event, int len, int merge);
+const uint8_t *event, size_t len, int 
merge);
 
 /**
  * Set missing durations and sort subtitles by PTS, and then byte position.
-- 
1.7.9.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH]Tell users about -use_absolute_path

2015-05-10 Thread Carl Eugen Hoyos
wm4  googlemail.com> writes:

> > Carl Eugen:
> > > > > > > + "Absolute path %s not tried for security reasons, "
> > > > > > > + "pass -use_absolute_path 1 to force using absolute paths\n",

> --demuxer-lavf-o=use_absolute_path=1

Please make this a whole sentence like above to 
I can commit it.

Thank you, Carl Eugen

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] Enable all tracks in Mov file

2015-05-10 Thread Kevin Wells
What lines of code do I need to change in libavformat/movenc.c file to
enable all audio tracks, and timecode track (basically all tracks) in a
quicktime mov file please? I searched through the list and found the
answer, but it related to a much older version of ffmpeg, so didn't relate.

Kind regards.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH] fate: Test pullup and fieldmatch with 5 instead of 1 frame

2015-05-10 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 tests/fate-run.sh|3 ++-
 tests/fate/filter-video.mak  |4 ++--
 tests/ref/fate/filter-pixfmts-fieldmatch |   10 +-
 tests/ref/fate/filter-pixfmts-pullup |   24 
 4 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/tests/fate-run.sh b/tests/fate-run.sh
index f795fdf..b88730a 100755
--- a/tests/fate-run.sh
+++ b/tests/fate-run.sh
@@ -195,6 +195,7 @@ pixfmts(){
 filter=${filter%_*}
 filter_args=$1
 prefilter_chain=$2
+nframes=${3:-1}
 
 showfiltfmts="$target_exec $target_path/libavfilter/filtfmts-test"
 scale_exclude_fmts=${outfile}_scale_exclude_fmts
@@ -213,7 +214,7 @@ pixfmts(){
 outertest=$test
 for pix_fmt in $pix_fmts; do
 test=$pix_fmt
-video_filter "${prefilter_chain}format=$pix_fmt,$filter=$filter_args" 
-pix_fmt $pix_fmt -frames:v 1
+video_filter "${prefilter_chain}format=$pix_fmt,$filter=$filter_args" 
-pix_fmt $pix_fmt -frames:v $nframes
 done
 
 rm $in_fmts $scale_in_fmts $scale_out_fmts $scale_exclude_fmts
diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak
index d9343b2..1271dc1 100644
--- a/tests/fate/filter-video.mak
+++ b/tests/fate/filter-video.mak
@@ -349,7 +349,7 @@ FATE_FILTER_PIXFMTS-$(CONFIG_FIELD_FILTER) += 
fate-filter-pixfmts-field
 fate-filter-pixfmts-field: CMD = pixfmts "bottom"
 
 FATE_FILTER_PIXFMTS-$(call ALLYES, TELECINE_FILTER FIELDMATCH_FILTER) += 
fate-filter-pixfmts-fieldmatch
-fate-filter-pixfmts-fieldmatch: CMD = pixfmts "" "telecine,"
+fate-filter-pixfmts-fieldmatch: CMD = pixfmts "" "telecine," 5
 
 FATE_FILTER_PIXFMTS-$(CONFIG_FIELDORDER_FILTER) += 
fate-filter-pixfmts-fieldorder
 fate-filter-pixfmts-fieldorder: CMD = pixfmts "tff" "setfield=bff,"
@@ -376,7 +376,7 @@ FATE_FILTER_PIXFMTS-$(CONFIG_PAD_FILTER) += 
fate-filter-pixfmts-pad
 fate-filter-pixfmts-pad:   CMD = pixfmts "500:400:20:20"
 
 FATE_FILTER_PIXFMTS-$(call ALLYES, TELECINE_FILTER PULLUP_FILTER) += 
fate-filter-pixfmts-pullup
-fate-filter-pixfmts-pullup: CMD = pixfmts "" "telecine,"
+fate-filter-pixfmts-pullup: CMD = pixfmts "" "telecine," 5
 
 FATE_FILTER_PIXFMTS-$(CONFIG_ROTATE_FILTER) += fate-filter-pixfmts-rotate
 fate-filter-pixfmts-rotate: CMD = pixfmts "2*PI*n/50"
diff --git a/tests/ref/fate/filter-pixfmts-fieldmatch 
b/tests/ref/fate/filter-pixfmts-fieldmatch
index cbd32f0..8b436c1 100644
--- a/tests/ref/fate/filter-pixfmts-fieldmatch
+++ b/tests/ref/fate/filter-pixfmts-fieldmatch
@@ -1,5 +1,5 @@
-yuv410p b5dc363ece6aa953a306c036c7e4d1f8
-yuv411p 4424432cd71ff3771420e96eeab31b17
-yuv420p a4f8a78b55ea5ad5b186cf260168fd0b
-yuv422p 1f3636c6d33c16f5147c365bc403b481
-yuv444p 801c6fc49a0cdc09cb7dbb97ec9cc63f
+yuv410p 5dc7365a9312cc1b97f96a725160264c
+yuv411p 8fc868473541c5ef877feb75082cd445
+yuv420p 4d6113f4e718204f68f6361a84d8c85c
+yuv422p 0b85bc6f47771722778af5af840f1025
+yuv444p 45f6708d4ac9c34505320a9a67d6a4e8
diff --git a/tests/ref/fate/filter-pixfmts-pullup 
b/tests/ref/fate/filter-pixfmts-pullup
index 3905a2d..3dc75b7 100644
--- a/tests/ref/fate/filter-pixfmts-pullup
+++ b/tests/ref/fate/filter-pixfmts-pullup
@@ -1,12 +1,12 @@
-gray68c24cf3dbf84fde2db57e7dddfc025a
-yuv410p 0416e0c5359efe8c5577c564af72274d
-yuv411p 7dc0b5d9f933b9b2eb56879be4b82545
-yuv420p 4788ee936d7bdad49abcd9510a058900
-yuv422p bf9b6c5829e8e0c619d273b7b759e33d
-yuv440p 44c1b4461b873ae22dff024072878e10
-yuv444p 88315c711c261aeb62d0c7701ef5c1bf
-yuvj411p7387b729f4ab97d107e5f4bcc0d89422
-yuvj420pd72a37540785e2e7d8400ee457f20456
-yuvj422p32b27295e432da29d397404b5049c2a2
-yuvj440peaec52d14f632d29ad95be3f22591540
-yuvj444pee3a0e4dee7c19e037d65887bd4ff70e
+gray169649331886d246cbaed13d709cc628
+yuv410p 3791f72f60aa64cc42473abf1b95a31d
+yuv411p e60995e87dac2a41e7741a0eb90823bd
+yuv420p 57fc8ccf49a5fca9f36a049ed63e886d
+yuv422p 9b84d29b6b00181b651986af3b60b716
+yuv440p 9c82289fb44d1416a5bf38d043fda34c
+yuv444p 8e4243bdef5db6f0e7a87a3a20cc66a1
+yuvj411pfe0d24197fa836c4cd38f43725162d3b
+yuvj420p59113874aad7d70a070c8739ce625ce3
+yuvj422p1837e104755c6a1f51097627a63be2d4
+yuvj440p65eeb4f10b106806ba412368ba7dba11
+yuvj444pdb4642024f594aa306a25e6b2ad990d4
-- 
1.7.9.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] dashenc: replace attribute id with contentType for the AdaptationSet element

2015-05-10 Thread Michael Niedermayer
On Sun, May 10, 2015 at 03:31:44AM -0300, James Almer wrote:
> id should be an integer, not a string. It is also optional, so use
> contentType instead which is the proper attribute for these values.
> 
> This addresses ticket #4545, fixing an MPD validation error.
> 
> Signed-off-by: James Almer 

applied

thanks

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 3/4] avcodec/mpeg12enc: Use av_format_option_for_user()

2015-05-10 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 libavcodec/mpeg12enc.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index edcce35..33725ba 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -199,8 +199,10 @@ static av_cold int encode_init(AVCodecContext *avctx)
 
 if (s->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) {
 if ((avctx->width & 0xFFF) == 0 || (avctx->height & 0xFFF) == 0) {
+char tmp[256];
+const char *option = av_format_option_for_user(avctx, "strict", 
AV_STRINGIFY(FF_COMPLIANCE_UNOFFICIAL), tmp, sizeof(tmp));
 av_log(avctx, AV_LOG_ERROR, "Width or Height are not allowed to be 
multiples of 4096\n"
-"add '-strict %d' if you want to use 
them anyway.\n", FF_COMPLIANCE_UNOFFICIAL);
+"%s if you want to use them 
anyway.\n", option);
 return AVERROR(EINVAL);
 }
 }
-- 
1.7.9.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/4] avcodec: add format_option_for_user_func callback

2015-05-10 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 libavcodec/avcodec.h   |3 +++
 libavcodec/options_table.h |1 +
 2 files changed, 4 insertions(+)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 4aeb57a..4560d8c 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -37,6 +37,7 @@
 #include "libavutil/dict.h"
 #include "libavutil/frame.h"
 #include "libavutil/log.h"
+#include "libavutil/opt.h"
 #include "libavutil/pixfmt.h"
 #include "libavutil/rational.h"
 
@@ -3146,6 +3147,8 @@ typedef struct AVCodecContext {
  * - decoding: set by user through AVOPtions (NO direct access)
  */
 char *codec_whitelist;
+
+av_format_option_for_user_func format_option_for_user_func;
 } AVCodecContext;
 
 AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index a906864..f7d42a3 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -495,6 +495,7 @@ static const AVOption avcodec_options[] = {
 {"codec_whitelist", "List of decoders that are allowed to be used", 
OFFSET(codec_whitelist), AV_OPT_TYPE_STRING, { .str = NULL },  CHAR_MIN, 
CHAR_MAX, A|V|S|D },
 {"pixel_format", "set pixel format", OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, 
{.i64=AV_PIX_FMT_NONE}, -1, INT_MAX, 0 },
 {"video_size", "set video size", OFFSET(width), AV_OPT_TYPE_IMAGE_SIZE, 
{.str=NULL}, 0, INT_MAX, 0 },
+{"format_option_for_user_func", NULL, OFFSET(format_option_for_user_func), 
AV_OPT_TYPE_PTR, {.str=NULL}, 0, 0, 0 },
 {NULL},
 };
 
-- 
1.7.9.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/4] avutil: add av_format_option_for_user() callback system

2015-05-10 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 libavutil/opt.c |   32 
 libavutil/opt.h |   21 +
 2 files changed, 53 insertions(+)

diff --git a/libavutil/opt.c b/libavutil/opt.c
index 62db1b5..12b5532 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -1876,6 +1876,8 @@ int av_opt_serialize(void *obj, int opt_flags, int flags, 
char **buffer,
 continue;
 if (flags & AV_OPT_SERIALIZE_SKIP_DEFAULTS && 
av_opt_is_set_to_default(obj, o) > 0)
 continue;
+if (o->type == AV_OPT_TYPE_PTR)
+continue;
 if ((ret = av_opt_get(obj, o->name, 0, &buf)) < 0) {
 av_bprint_finalize(&bprint, NULL);
 return ret;
@@ -1893,6 +1895,36 @@ int av_opt_serialize(void *obj, int opt_flags, int 
flags, char **buffer,
 return 0;
 }
 
+static const char* default_format_option_for_user(void *obj, const char* name, 
const char* value, char *tmp, int tmp_len)
+{
+snprintf(tmp, tmp_len, "set '%s' to '%s'", name, value);
+return tmp;
+}
+
+const char* av_format_option_for_user(void *obj, const char* name, const char* 
value, char *tmp, int tmp_len)
+{
+const AVClass *c = *(AVClass**)obj;
+av_format_option_for_user_func *ptr = av_opt_ptr(c, obj, 
"format_option_for_user_func");
+av_format_option_for_user_func format_option_for_user = NULL;
+
+if (ptr)
+format_option_for_user = *ptr;
+
+if (!format_option_for_user)
+format_option_for_user = default_format_option_for_user;
+
+return format_option_for_user(obj, name, value, tmp, tmp_len);
+}
+
+void av_set_format_option_for_user_func(void *obj, 
av_format_option_for_user_func f)
+{
+const AVClass *c = *(AVClass**)obj;
+av_format_option_for_user_func *ptr = av_opt_ptr(c, obj, 
"format_option_for_user_func");
+
+if (ptr)
+*ptr = f;
+}
+
 #ifdef TEST
 
 typedef struct TestContext
diff --git a/libavutil/opt.h b/libavutil/opt.h
index 5fc8a9b..4283b83 100644
--- a/libavutil/opt.h
+++ b/libavutil/opt.h
@@ -218,6 +218,8 @@
  * before the file is actually opened.
  */
 
+typedef const char * (*av_format_option_for_user_func)(void *obj, const char* 
name, const char* value, char *tmp, int tmp_len);
+
 enum AVOptionType{
 AV_OPT_TYPE_FLAGS,
 AV_OPT_TYPE_INT,
@@ -236,6 +238,7 @@ enum AVOptionType{
 AV_OPT_TYPE_DURATION   = MKBETAG('D','U','R',' '),
 AV_OPT_TYPE_COLOR  = MKBETAG('C','O','L','R'),
 AV_OPT_TYPE_CHANNEL_LAYOUT = MKBETAG('C','H','L','A'),
+AV_OPT_TYPE_PTR= MKBETAG('P','T','R',' '),
 #if FF_API_OLD_AVOPTIONS
 FF_OPT_TYPE_FLAGS = 0,
 FF_OPT_TYPE_INT,
@@ -894,6 +897,24 @@ int av_opt_is_set_to_default_by_name(void *obj, const char 
*name, int search_fla
  */
 int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer,
  const char key_val_sep, const char pairs_sep);
+
+/**
+ * Formats the given AVOption for display to the user.
+ *
+ * This uses a callback with the name "format_option_for_user_func" if such 
field
+ * exists in obj.
+ *
+ * @param obj   pointer to a AVClass based object.
+ * @param name  name of the AVOption
+ * @param value value to set the AVOption to, may be NULL
+ * @param tmp   space in which the formatted option is constructed
+ * @param tmp_len, length of the tmp array
+ * @returns pointer to the formated string, this may match tmp
+ */
+const char* av_format_option_for_user(void *obj, const char* name, const char* 
value, char *tmp, int tmp_len);
+
+void av_set_format_option_for_user_func(void *obj, 
av_format_option_for_user_func f);
+
 /**
  * @}
  */
-- 
1.7.9.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 4/4] ffmpeg: set format_option_for_user() callback

2015-05-10 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 cmdutils.c   |6 ++
 cmdutils.h   |2 ++
 ffmpeg.c |3 +++
 ffmpeg_opt.c |2 ++
 4 files changed, 13 insertions(+)

diff --git a/cmdutils.c b/cmdutils.c
index db89256..f24f65d 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -2111,6 +2111,12 @@ double get_rotation(AVStream *st)
 return theta;
 }
 
+const char* format_option_for_user(void *obj, const char* name, const char* 
value, char *tmp, int tmp_len)
+{
+snprintf(tmp, tmp_len, "add '-%s %s'", name, value);
+return tmp;
+}
+
 #if CONFIG_AVDEVICE
 static int print_device_sources(AVInputFormat *fmt, AVDictionary *opts)
 {
diff --git a/cmdutils.h b/cmdutils.h
index a21ce35..47d1042 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -599,4 +599,6 @@ void *grow_array(void *array, int elem_size, int *size, int 
new_size);
 
 double get_rotation(AVStream *st);
 
+const char* format_option_for_user(void *obj, const char* name, const char* 
value, char *tmp, int tmp_len);
+
 #endif /* CMDUTILS_H */
diff --git a/ffmpeg.c b/ffmpeg.c
index 8c288ae..aec7f13 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2419,6 +2419,7 @@ static int init_input_stream(int ist_index, char *error, 
int error_len)
 ist->dec_ctx->get_format= get_format;
 ist->dec_ctx->get_buffer2   = get_buffer;
 ist->dec_ctx->thread_safe_callbacks = 1;
+av_set_format_option_for_user_func(ist->dec_ctx, 
format_option_for_user);
 
 av_opt_set_int(ist->dec_ctx, "refcounted_frames", 1, 0);
 if (ist->dec_ctx->codec_id == AV_CODEC_ID_DVB_SUBTITLE &&
@@ -3050,6 +3051,8 @@ static int transcode_init(void)
 av_dict_set(&ost->encoder_opts, "threads", "auto", 0);
 av_dict_set(&ost->encoder_opts, "side_data_only_packets", "1", 0);
 
+av_set_format_option_for_user_func(ost->enc_ctx, 
format_option_for_user);
+
 if ((ret = avcodec_open2(ost->enc_ctx, codec, &ost->encoder_opts)) 
< 0) {
 if (ret == AVERROR_EXPERIMENTAL)
 abort_codec_experimental(codec, 1);
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 240f727..bf297f0 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -901,6 +901,8 @@ static int open_input_file(OptionsContext *o, const char 
*filename)
 remove_avoptions(&o->g->format_opts, o->g->codec_opts);
 assert_avoptions(o->g->format_opts);
 
+av_set_format_option_for_user_func(ic, format_option_for_user);
+
 /* apply forced codec ids */
 for (i = 0; i < ic->nb_streams; i++)
 choose_decoder(o, ic, ic->streams[i]);
-- 
1.7.9.5

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] ffserver jpg patch

2015-05-10 Thread ill

Can the patch be applied now?



On Mon, May 04, 2015 at 06:35:36PM -0600, ill wrote:

I changed it to git and add the .write header to the last part. The first part 
compiled after I changed ffserver.c, so it is no longer corrupted. Muxer 
detection seems to work when I tried it for the middle part. It should be good 
to fix ffserver now?


patch is still corrupted by linebreaks
probably your MUA is breaking long lines, try to attach the patch or
use git send-email

[...]



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel








diff -Nrup ffmpeg-git--orig/ffserver.c ffmpeg-git/ffserver.c
--- ffmpeg-git--orig/ffserver.c2015-03-16 20:25:48.0 +0100
+++ ffmpeg-git/ffserver.c2015-04-05 02:33:53.0 +0200
@@ -967,6 +967,10 @@ static int handle_connection(HTTPContext
 /* close connection if trailer sent */
 if (c->state == HTTPSTATE_SEND_DATA_TRAILER)
 return -1;
+/* Check if it is a single jpeg frame 123 */
+if (c->stream->single_frame && c->data_count > c->cur_frame_bytes && c->cur_frame_bytes > 0) {
+close_connection(c);
+}
 break;
 case HTTPSTATE_RECEIVE_DATA:
 /* no need to read if no events */
diff -Nrup ffmpeg-git--orig/ffserver_config.c
ffmpeg-git/ffserver_config.c
--- ffmpeg-git--orig/ffserver_config.c2015-03-16
20:25:48.0 +0100
+++ ffmpeg-git/ffserver_config.c2015-04-05 02:33:53.0 +0200
@@ -862,8 +862,10 @@ static int ffserver_parse_config_stream(
 } else {
 stream->stream_type = STREAM_TYPE_LIVE;
 /* JPEG cannot be used here, so use single frame MJPEG */
-if (!strcmp(arg, "jpeg"))
-strcpy(arg, "mjpeg");
+if (!strcmp(arg, "jpeg")) {
+strcpy(arg, "singlejpeg");
+stream->single_frame=1;
+}
 stream->fmt = ffserver_guess_format(arg, NULL, NULL);
 if (!stream->fmt)
 ERROR("Unknown Format: '%s'\n", arg);
diff -Nrup ffmpeg-git--orig/ffserver_config.h
ffmpeg-git/ffserver_config.h
--- ffmpeg-git--orig/ffserver_config.h2015-03-16
20:25:48.0 +0100
+++ ffmpeg-git/ffserver_config.h2015-04-05 02:33:53.0 +0200
@@ -79,6 +79,7 @@ typedef struct FFServerStream {
 int multicast_port;   /* first port used for multicast */
 int multicast_ttl;
 int loop; /* if true, send the stream in loops (only meaningful if file) */
+char single_frame;/* only single frame */

 /* feed specific */
 int feed_opened;  /* true if someone is writing to the
feed */
diff -Nrup ffmpeg-git--orig/libavformat/allformats.c
ffmpeg-git/libavformat/allformats.c
--- ffmpeg-git--orig/libavformat/allformats.c2015-03-16
20:25:52.0 +0100
+++ ffmpeg-git/libavformat/allformats.c2015-04-05
02:33:53.0 +0200
@@ -273,6 +273,7 @@ void av_register_all(void)
 REGISTER_MUXER   (SEGMENT,  stream_segment);
 REGISTER_DEMUXER (SHORTEN,  shorten);
 REGISTER_DEMUXER (SIFF, siff);
+REGISTER_MUXER   (SINGLEJPEG,   singlejpeg);
 REGISTER_DEMUXER (SLN,  sln);
 REGISTER_DEMUXER (SMACKER,  smacker);
 REGISTER_MUXDEMUX(SMJPEG,   smjpeg);
diff -Nrup ffmpeg-git--orig/libavformat/rawenc.c
ffmpeg-git/libavformat/rawenc.c
--- ffmpeg-git--orig/libavformat/rawenc.c2015-03-16
20:25:54.0 +0100
+++ ffmpeg-git/libavformat/rawenc.c2015-04-05$
02:33:53.0 +0200
@@ -250,6 +250,18 @@ AVOutputFormat ff_mjpeg_muxer = {
 .write_packet  = ff_raw_write_packet,
 .flags = AVFMT_NOTIMESTAMPS,
 };
+
+AVOutputFormat ff_singlejpeg_muxer = {
+.name  = "singlejpeg",
+.long_name = NULL_IF_CONFIG_SMALL("JPEG single image"),
+.mime_type = "image/jpeg",
+.extensions= "jpg,jpeg",
+.audio_codec   = AV_CODEC_ID_NONE,
+.video_codec   = AV_CODEC_ID_MJPEG,
+.write_packet  = ff_raw_write_packet,
+.flags = AVFMT_NOTIMESTAMPS,
+.write_header  = force_one_stream,
+};
 #endif
 
 #if CONFIG_MLP_MUXER



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] ffserver jpg patch

2015-05-10 Thread Michael Niedermayer
On Sun, May 10, 2015 at 07:20:02PM -0600, ill wrote:
> Can the patch be applied now?

please provide a patch which applies
this one does not (see below)
also make sure the patch is a proper git patch for example one
generated by "git format-patch -1"
also please make sure it has a matching commit message and a correctly
set author (this is important)

Applying: ffserver jpg patch
fatal: patch fragment without header at line 20: @@ -862,8 +862,10 @@ static 
int ffserver_parse_config_stream(
Patch failed at 0001 ffserver jpg patch
The copy of the patch that failed is found in:
   ffmpeg/.git/rebase-apply/patch

[...]

-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle


signature.asc
Description: Digital signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] configure: disabled -mips64 option for loongson and remove redundant flags

2015-05-10 Thread 周晓勇
>From 9837274dcee5e1900160901cf28d883246a7ecfb Mon Sep 17 00:00:00 2001
From: Zhou Xiaoyong 
Date: Mon, 11 May 2015 03:28:52 -0400
Subject: [PATCH 1/2] configure: disabled -mips64 option for loongson and remove 
redundant flags

1.Option -march=loongson3a conflicts with -mips64 or -mips64r2.
2.Option -mhard-float has been added.

Signed-off-by: Zhou Xiaoyong 
---
 configure |5 +
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/configure b/configure
index 1b41367..7716e66 100755
--- a/configure
+++ b/configure
@@ -3937,7 +3937,6 @@ elif enabled mips; then
 enable fast_cmov
 enable fast_unaligned
 disable aligned_stack
-cpuflags="-march=$cpu"
 ;;
 generic)
 disable mips32r5
@@ -4691,7 +4690,7 @@ elif enabled mips; then
 if enabled mips64 && (enabled mipsdspr1 || enabled mipsdspr2); then
 add_cflags "-mips64r2"
 add_asflags "-mips64r2"
-elif enabled mips64 && enabled mipsfpu; then
+elif enabled mips64 && enabled mipsfpu && disabled loongson3; then
 add_cflags "-mips64"
 add_asflags "-mips64"
 elif enabled mipsdspr1 || enabled mipsdspr2; then
@@ -4716,8 +4715,6 @@ elif enabled mips; then
  check_inline_asm mipsfpu   '"madd.d $f0, $f2, $f4, $f6"'
 enabled msa   && check_cflags "-mmsa" && check_ldflags "-mmsa" &&
  check_inline_asm msa   '"addvi.b $w0, $w1, 1"'
-enabled loongson3 && add_cflags "-mhard-float" && add_asflags 
"-mhard-float" &&
-check_inline_asm loongson3 '"gsldxc1 $f0, 0($2, $3)"'
 
 enabled mips32r5 && add_asflags "-mips32r5 -mfp64"
 enabled mips64r6 && add_asflags "-mips64r6 -mfp64"
--
1.7.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 2/2] avcodec: optimize mpegvideo decoder for Loongson-3 v1

2015-05-10 Thread 周晓勇
>From 3d5a9d0d38c96d6b6ec51b082102f3a231b5b881 Mon Sep 17 00:00:00 2001
From: ZhouXiaoyong 
Date: Mon, 11 May 2015 09:27:00 +0800
Subject: [PATCH 2/2] avcodec: optimize mpegvideo decoder for Loongson-3 v1

Signed-off-by: ZhouXiaoyong 
---
 libavcodec/mips/Makefile |4 +
 libavcodec/mips/mpegvideo_init.c |   44 +++
 libavcodec/mips/mpegvideo_loongson.c |  563 ++
 libavcodec/mips/mpegvideo_loongson.h |   40 +++
 libavcodec/mpegvideo.c   |2 +
 libavcodec/mpegvideo.h   |1 +
 6 files changed, 654 insertions(+), 0 deletions(-)

diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile
index eaedd7f..c9b3294 100644
--- a/libavcodec/mips/Makefile
+++ b/libavcodec/mips/Makefile
@@ -22,3 +22,7 @@ OBJS-$(CONFIG_HEVC_DECODER)   += 
mips/hevcdsp_init_mips.o
 OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_init_mips.o
 MSA-OBJS-$(CONFIG_HEVC_DECODER)   += mips/hevcdsp_msa.o
 MSA-OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_msa.o
+
+#Loongson-3 SIMD Optimization
+LOONGSON3-OBJS-$(CONFIG_MPEGVIDEO)+= mips/mpegvideo_init.o
+LOONGSON3-OBJS-$(CONFIG_MPEGVIDEO)+= mips/mpegvideo_loongson.o
diff --git a/libavcodec/mips/mpegvideo_init.c b/libavcodec/mips/mpegvideo_init.c
new file mode 100644
index 000..ba8c801
--- /dev/null
+++ b/libavcodec/mips/mpegvideo_init.c
@@ -0,0 +1,44 @@
+/*
+ * Loongson optimized mpegvideo
+ *
+ * Copyright (c) 2015 Loongson Technology Corporation Limited
+ * Copyright (c) 2015 Zhou Xiaoyong 
+ *
+ * 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 
+
+#include "config.h"
+#include "libavutil/attributes.h"
+#include "libavcodec/mpegvideo.h"
+#include "mpegvideo_loongson.h"
+
+av_cold void ff_MPV_common_init_loongson(MpegEncContext *s)
+{
+s->dct_unquantize_h263_intra = ff_dct_unquantize_h263_intra_mmi;
+s->dct_unquantize_h263_inter = ff_dct_unquantize_h263_inter_mmi;
+s->dct_unquantize_mpeg1_intra = ff_dct_unquantize_mpeg1_intra_mmi;
+s->dct_unquantize_mpeg1_inter = ff_dct_unquantize_mpeg1_inter_mmi;
+
+if (s->flags & CODEC_FLAG_BITEXACT) {
+s->dct_unquantize_mpeg2_intra = 
ff_dct_unquantize_mpeg2_intra_bitexact_mmi;
+}
+
+s->dct_unquantize_mpeg2_inter = ff_dct_unquantize_mpeg2_inter_mmi;
+s->denoise_dct = ff_denoise_dct_mmi;
+}
diff --git a/libavcodec/mips/mpegvideo_loongson.c 
b/libavcodec/mips/mpegvideo_loongson.c
new file mode 100644
index 000..50a97f3
--- /dev/null
+++ b/libavcodec/mips/mpegvideo_loongson.c
@@ -0,0 +1,563 @@
+/*
+ * Loongson optimized mpegvideo
+ *
+ * Copyright (c) 2015 Loongson Technology Corporation Limited
+ * Copyright (c) 2015 Zhou Xiaoyong 
+ *Zhang Shuangshuang 
+ *
+ * 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 "mpegvideo_loongson.h"
+
+void ff_dct_unquantize_h263_intra_mmi(MpegEncContext *s, int16_t *block,
+int n, int qscale)
+{
+int64_t level, qmul, qadd, nCoeffs;
+
+qmul = qscale << 1;
+assert(s->block_last_index[n]>=0 || s->h263_aic);
+
+if (!s->h263_aic) {
+if (n<4)
+level = block[0] * s->y_dc_scale;
+else
+level = block[0] * s->c_dc_scale;
+qadd = (qscale-1) | 1;
+} else {
+qadd = 0;
+level = block[0];
+}
+
+if(s->ac_pred)
+nCoeffs = 63;
+else
+nCoeffs = s->inter_scantable.raster_end[s->block_last_index[n]];
+
+__asm__ volatile (
+".set arch=loongson3a   \r\n"
+"xo

Re: [FFmpeg-devel] ffserver jpg patch

2015-05-10 Thread ill

It applies for me.
Konsole output
$ patch -p1  I still haven't gotten a reply about the author. Can I just set the 
author as anybody or does it have to be someone specific?



On Sun, May 10, 2015 at 07:20:02PM -0600, ill wrote:

Can the patch be applied now?

please provide a patch which applies
this one does not (see below)
also make sure the patch is a proper git patch for example one
generated by "git format-patch -1"
also please make sure it has a matching commit message and a correctly
set author (this is important)

Applying: ffserver jpg patch
fatal: patch fragment without header at line 20: @@ -862,8 +862,10 @@ static 
int ffserver_parse_config_stream(
Patch failed at 0001 ffserver jpg patch
The copy of the patch that failed is found in:
ffmpeg/.git/rebase-apply/patch

[...]



___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avcodec/libx265: use x265 Multi-library Interface to query the API

2015-05-10 Thread Gopu Govindaswamy
Hello Derek,

Thanks for review, Do i need to send a new patch or this patch itself can
move into ffmpeg repo?

Regards
Gopu

On Sat, May 9, 2015 at 12:38 AM, Derek Buitenhuis <
derek.buitenh...@gmail.com> wrote:

> On 5/7/2015 10:17 AM, Gopu Govindaswamy wrote:
> > Hello,
> >
> > this patch is ffmpeg can now use the x265 multi-library interface to
> make a
> > run-time selection between a number of libx265 libraries (perhaps 8bpp
> and
> > 16bpp).
> >
> > I have attached the patch with this mail,
>
> [...]
>
> > -x265_picture x265pic_out = { 0 };
> > +x265_picture x265pic_out = { { 0 } };
>
> Unrelated change.
>
> > -ret = x265_encoder_encode(ctx->encoder, &nal, &nnal,
> > +ret = ctx->api->encoder_encode(ctx->encoder, &nal, &nnal,
> >pic ? &x265pic : NULL, &x265pic_out);
>
> Line needs re-indent.
>
> Other than that, I think it can be applied.
>
> - Derek
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>



-- 
Thanks & Regards
Gopu G
Multicoreware Inc
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/4] avutil: add av_format_option_for_user() callback system

2015-05-10 Thread James Almer
On 10/05/15 10:18 PM, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  libavutil/opt.c |   32 
>  libavutil/opt.h |   21 +
>  2 files changed, 53 insertions(+)
> 

If this is meant to solve the whole debate from the "Tell users about 
-use_absolute_path"
thread, then i think it's a bit overkill. "Set  to " is 
generic enough
that works in any situation, be it for API user or ffmpeg.c, and could be used 
in every
av_log message.

> diff --git a/libavutil/opt.c b/libavutil/opt.c
> index 62db1b5..12b5532 100644
> --- a/libavutil/opt.c
> +++ b/libavutil/opt.c
> @@ -1876,6 +1876,8 @@ int av_opt_serialize(void *obj, int opt_flags, int 
> flags, char **buffer,
>  continue;
>  if (flags & AV_OPT_SERIALIZE_SKIP_DEFAULTS && 
> av_opt_is_set_to_default(obj, o) > 0)
>  continue;
> +if (o->type == AV_OPT_TYPE_PTR)
> +continue;
>  if ((ret = av_opt_get(obj, o->name, 0, &buf)) < 0) {
>  av_bprint_finalize(&bprint, NULL);
>  return ret;
> @@ -1893,6 +1895,36 @@ int av_opt_serialize(void *obj, int opt_flags, int 
> flags, char **buffer,
>  return 0;
>  }
>  
> +static const char* default_format_option_for_user(void *obj, const char* 
> name, const char* value, char *tmp, int tmp_len)
> +{
> +snprintf(tmp, tmp_len, "set '%s' to '%s'", name, value);
> +return tmp;
> +}
> +
> +const char* av_format_option_for_user(void *obj, const char* name, const 
> char* value, char *tmp, int tmp_len)
> +{
> +const AVClass *c = *(AVClass**)obj;
> +av_format_option_for_user_func *ptr = av_opt_ptr(c, obj, 
> "format_option_for_user_func");
> +av_format_option_for_user_func format_option_for_user = NULL;
> +
> +if (ptr)
> +format_option_for_user = *ptr;
> +
> +if (!format_option_for_user)
> +format_option_for_user = default_format_option_for_user;
> +
> +return format_option_for_user(obj, name, value, tmp, tmp_len);
> +}
> +
> +void av_set_format_option_for_user_func(void *obj, 
> av_format_option_for_user_func f)
> +{
> +const AVClass *c = *(AVClass**)obj;
> +av_format_option_for_user_func *ptr = av_opt_ptr(c, obj, 
> "format_option_for_user_func");
> +
> +if (ptr)
> +*ptr = f;
> +}
> +

The functions should use the av_opt prefix (something like av_opt_format_option,
av_opt_set_format_option, av_opt_format_for_user, etc).
"format_option_for_user_func" is IMO too long.

>  #ifdef TEST
>  
>  typedef struct TestContext
> diff --git a/libavutil/opt.h b/libavutil/opt.h
> index 5fc8a9b..4283b83 100644
> --- a/libavutil/opt.h
> +++ b/libavutil/opt.h
> @@ -218,6 +218,8 @@
>   * before the file is actually opened.
>   */
>  
> +typedef const char * (*av_format_option_for_user_func)(void *obj, const 
> char* name, const char* value, char *tmp, int tmp_len);
> +
>  enum AVOptionType{
>  AV_OPT_TYPE_FLAGS,
>  AV_OPT_TYPE_INT,
> @@ -236,6 +238,7 @@ enum AVOptionType{
>  AV_OPT_TYPE_DURATION   = MKBETAG('D','U','R',' '),
>  AV_OPT_TYPE_COLOR  = MKBETAG('C','O','L','R'),
>  AV_OPT_TYPE_CHANNEL_LAYOUT = MKBETAG('C','H','L','A'),
> +AV_OPT_TYPE_PTR= MKBETAG('P','T','R',' '),
>  #if FF_API_OLD_AVOPTIONS
>  FF_OPT_TYPE_FLAGS = 0,
>  FF_OPT_TYPE_INT,
> @@ -894,6 +897,24 @@ int av_opt_is_set_to_default_by_name(void *obj, const 
> char *name, int search_fla
>   */
>  int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer,
>   const char key_val_sep, const char pairs_sep);
> +
> +/**
> + * Formats the given AVOption for display to the user.
> + *
> + * This uses a callback with the name "format_option_for_user_func" if such 
> field
> + * exists in obj.
> + *
> + * @param obj   pointer to a AVClass based object.
> + * @param name  name of the AVOption
> + * @param value value to set the AVOption to, may be NULL
> + * @param tmp   space in which the formatted option is constructed
> + * @param tmp_len, length of the tmp array
> + * @returns pointer to the formated string, this may match tmp
> + */
> +const char* av_format_option_for_user(void *obj, const char* name, const 
> char* value, char *tmp, int tmp_len);
> +
> +void av_set_format_option_for_user_func(void *obj, 
> av_format_option_for_user_func f);
> +
>  /**
>   * @}
>   */
> 

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] avformat/subtitles: Use size_t for len

2015-05-10 Thread Clément Bœsch
On Sun, May 10, 2015 at 03:38:40PM +0200, Michael Niedermayer wrote:
> string length could theoretically be larger than int
> 
> Signed-off-by: Michael Niedermayer 
> ---
>  libavformat/subtitles.c |4 ++--
>  libavformat/subtitles.h |2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/libavformat/subtitles.c b/libavformat/subtitles.c
> index 67624fc..5bdbc8d 100644
> --- a/libavformat/subtitles.c
> +++ b/libavformat/subtitles.c
> @@ -109,7 +109,7 @@ int ff_text_peek_r8(FFTextReader *r)
>  }
>  
>  AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q,
> -const uint8_t *event, int len, int merge)
> +const uint8_t *event, size_t len, int 
> merge)
>  {
>  AVPacket *subs, *sub;
>  
> @@ -303,7 +303,7 @@ int ff_smil_extract_next_text_chunk(FFTextReader *tr, 
> AVBPrint *buf, char *c)
>  const char *ff_smil_get_attr_ptr(const char *s, const char *attr)
>  {
>  int in_quotes = 0;
> -const int len = strlen(attr);
> +const size_t len = strlen(attr);
>  
>  while (*s) {
>  while (*s) {
> diff --git a/libavformat/subtitles.h b/libavformat/subtitles.h
> index eb719ea..885285c 100644
> --- a/libavformat/subtitles.h
> +++ b/libavformat/subtitles.h
> @@ -116,7 +116,7 @@ typedef struct {
>   *  previous one instead of adding a new entry, 0 otherwise
>   */
>  AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q,
> -const uint8_t *event, int len, int 
> merge);
> +const uint8_t *event, size_t len, int 
> merge);
>  
>  /**
>   * Set missing durations and sort subtitles by PTS, and then byte position.

LGTM

-- 
Clément B.


pgp58NEVtoHYp.pgp
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/4] avutil: add av_format_option_for_user() callback system

2015-05-10 Thread Timothy Gu
On May 10, 2015 10:26 PM, "James Almer"  wrote:
>
> On 10/05/15 10:18 PM, Michael Niedermayer wrote:
> > Signed-off-by: Michael Niedermayer 
> > ---
> >  libavutil/opt.c |   32 
> >  libavutil/opt.h |   21 +
> >  2 files changed, 53 insertions(+)
> >
>
> If this is meant to solve the whole debate from the "Tell users about
-use_absolute_path"
> thread, then i think it's a bit overkill. "Set  to " is
generic enough
> that works in any situation, be it for API user or ffmpeg.c, and could be
used in every
> av_log message.

+1.

[...]

Timothy
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] fate: Test pullup and fieldmatch with 5 instead of 1 frame

2015-05-10 Thread Clément Bœsch
On Mon, May 11, 2015 at 12:44:14AM +0200, Michael Niedermayer wrote:
> Signed-off-by: Michael Niedermayer 
> ---
>  tests/fate-run.sh|3 ++-
>  tests/fate/filter-video.mak  |4 ++--
>  tests/ref/fate/filter-pixfmts-fieldmatch |   10 +-
>  tests/ref/fate/filter-pixfmts-pullup |   24 
>  4 files changed, 21 insertions(+), 20 deletions(-)
> 

Hum, 5 frames test with telecine... I'd really go for more.

[...]

-- 
Clément B.


pgp2u2lnu3nup.pgp
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel