diff --git a/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-913-h264-do_not_discard_NAL_SEI_when_skipping_frames.patch b/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-0056-backport-h264-do-not-discard-NAL_SEI-when-skipping-frames.patch similarity index 52% rename from packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-913-h264-do_not_discard_NAL_SEI_when_skipping_frames.patch rename to packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-0056-backport-h264-do-not-discard-NAL_SEI-when-skipping-frames.patch index 7b9d7c6be5..2b5c33a933 100644 --- a/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-913-h264-do_not_discard_NAL_SEI_when_skipping_frames.patch +++ b/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-0056-backport-h264-do-not-discard-NAL_SEI-when-skipping-frames.patch @@ -1,18 +1,8 @@ -From 615c1fe2ff904cdb9ebcd8edc0b2c42c3cd6218c Mon Sep 17 00:00:00 2001 -From: Rainer Hochecker -Date: Mon, 9 Sep 2013 12:13:15 +0200 -Subject: [PATCH] ffmpeg backport: h264: do not discard NAL_SEI when skipping - frames - ---- - libavcodec/h264.c | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - diff --git a/libavcodec/h264.c b/libavcodec/h264.c -index 4f09c67..62ac8fb 100644 +index 85f2372..1cab49f 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c -@@ -4529,8 +4529,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, +@@ -4523,8 +4523,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size, first_slice = hx->nal_unit_type; } @@ -22,6 +12,3 @@ index 4f09c67..62ac8fb 100644 continue; again: --- -1.8.4 - diff --git a/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-0057-backport-swresample-Make-rematrix-maxvalue-user-settable.patch b/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-0057-backport-swresample-Make-rematrix-maxvalue-user-settable.patch new file mode 100644 index 0000000000..b826a613b0 --- /dev/null +++ b/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-0057-backport-swresample-Make-rematrix-maxvalue-user-settable.patch @@ -0,0 +1,84 @@ +From e2b718464e92fcde3d21c6653c88ddec2ab21c3f Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer +Date: Mon, 22 Jul 2013 03:23:54 +0200 +Subject: [PATCH] swresample: Make rematrix maxvalue user settable + +Signed-off-by: Michael Niedermayer +--- + libswresample/rematrix.c | 13 +++++++++++-- + libswresample/swresample.c | 1 + + libswresample/swresample_internal.h | 1 + + libswresample/version.h | 2 +- + 4 files changed, 14 insertions(+), 3 deletions(-) + +diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c +index 48aff3b..33e2966 100644 +--- a/libswresample/rematrix.c ++++ b/libswresample/rematrix.c +@@ -120,6 +120,7 @@ av_cold static int auto_matrix(SwrContext *s) + double maxcoef=0; + char buf[128]; + const int matrix_encoding = s->matrix_encoding; ++ float maxval; + + in_ch_layout = clean_layout(s, s->in_ch_layout); + if(!sane_layout(in_ch_layout)){ +@@ -304,8 +305,16 @@ av_cold static int auto_matrix(SwrContext *s) + if(s->rematrix_volume < 0) + maxcoef = -s->rematrix_volume; + +- if(( av_get_packed_sample_fmt(s->out_sample_fmt) < AV_SAMPLE_FMT_FLT +- || av_get_packed_sample_fmt(s->int_sample_fmt) < AV_SAMPLE_FMT_FLT) && maxcoef > 1.0){ ++ if (s->rematrix_maxval > 0) { ++ maxval = s->rematrix_maxval; ++ } else if ( av_get_packed_sample_fmt(s->out_sample_fmt) < AV_SAMPLE_FMT_FLT ++ || av_get_packed_sample_fmt(s->int_sample_fmt) < AV_SAMPLE_FMT_FLT) { ++ maxval = 1.0; ++ } else ++ maxval = INT_MAX; ++ ++ if(maxcoef > maxval){ ++ maxcoef /= maxval; + for(i=0; imatrix[i][j] /= maxcoef; +diff --git a/libswresample/swresample.c b/libswresample/swresample.c +index ba2afdb..cdfe5bf 100644 +--- a/libswresample/swresample.c ++++ b/libswresample/swresample.c +@@ -68,6 +68,7 @@ + {"lfe_mix_level" , "set LFE mix level" , OFFSET(lfe_mix_level ), AV_OPT_TYPE_FLOAT, {.dbl=0 }, -32 , 32 , PARAM}, + {"rmvol" , "set rematrix volume" , OFFSET(rematrix_volume), AV_OPT_TYPE_FLOAT, {.dbl=1.0 }, -1000 , 1000 , PARAM}, + {"rematrix_volume" , "set rematrix volume" , OFFSET(rematrix_volume), AV_OPT_TYPE_FLOAT, {.dbl=1.0 }, -1000 , 1000 , PARAM}, ++{"rematrix_maxval" , "set rematrix maxval" , OFFSET(rematrix_maxval), AV_OPT_TYPE_FLOAT, {.dbl=0.0 }, 0 , 1000 , PARAM}, + + {"flags" , "set flags" , OFFSET(flags ), AV_OPT_TYPE_FLAGS, {.i64=0 }, 0 , UINT_MAX , PARAM, "flags"}, + {"swr_flags" , "set flags" , OFFSET(flags ), AV_OPT_TYPE_FLAGS, {.i64=0 }, 0 , UINT_MAX , PARAM, "flags"}, +diff --git a/libswresample/swresample_internal.h b/libswresample/swresample_internal.h +index 108f837..ab19f21 100644 +--- a/libswresample/swresample_internal.h ++++ b/libswresample/swresample_internal.h +@@ -82,6 +82,7 @@ struct SwrContext { + float clev; ///< center mixing level + float lfe_mix_level; ///< LFE mixing level + float rematrix_volume; ///< rematrixing volume coefficient ++ float rematrix_maxval; ///< maximum value for rematrixing output + enum AVMatrixEncoding matrix_encoding; /**< matrixed stereo encoding */ + const int *channel_map; ///< channel index (or -1 if muted channel) map + int used_ch_count; ///< number of used input channels (mapped channel count if channel_map, otherwise in.ch_count) +diff --git a/libswresample/version.h b/libswresample/version.h +index df9df48..8272b76 100644 +--- a/libswresample/version.h ++++ b/libswresample/version.h +@@ -30,7 +30,7 @@ + + #define LIBSWRESAMPLE_VERSION_MAJOR 0 + #define LIBSWRESAMPLE_VERSION_MINOR 17 +-#define LIBSWRESAMPLE_VERSION_MICRO 102 ++#define LIBSWRESAMPLE_VERSION_MICRO 103 + + #define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \ + LIBSWRESAMPLE_VERSION_MINOR, \ +-- +1.8.4 + diff --git a/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-0058-backport-fixed-not-keeping-custom-http-headers.patch b/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-0058-backport-fixed-not-keeping-custom-http-headers.patch new file mode 100644 index 0000000000..9849eddd29 --- /dev/null +++ b/packages/multimedia/ffmpeg/patches/1.2.3/ffmpeg-0058-backport-fixed-not-keeping-custom-http-headers.patch @@ -0,0 +1,53 @@ +From 9fb6300b1cc36c8111cee017fbb8a3e37b0c4e68 Mon Sep 17 00:00:00 2001 +From: siriuzwhite +Date: Sun, 10 Nov 2013 23:26:16 +0100 +Subject: [PATCH] [backport] fixed ffmpeg not keep custom http headers when + playing hls stream + +--- + libavformat/hls.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/libavformat/hls.c b/libavformat/hls.c +index 7de6059..2e3fd00 100644 +--- a/libavformat/hls.c ++++ b/libavformat/hls.c +@@ -105,6 +105,7 @@ struct variant { + AVIOInterruptCB *interrupt_callback; + char *user_agent; ///< holds HTTP user agent set as an AVOption to the HTTP protocol context + char *cookies; ///< holds HTTP cookie values set in either the initial response or as an AVOption to the HTTP protocol context ++ char *headers; ///< holds HTTP headers set as an AVOption to the HTTP protocol context (kow|mitm) + } HLSContext; + + static int read_chomp_line(AVIOContext *s, char *buf, int maxlen) +@@ -224,6 +225,7 @@ static int parse_playlist(HLSContext *c, const char *url, + // broker prior HTTP options that should be consistent across requests + av_dict_set(&opts, "user-agent", c->user_agent, 0); + av_dict_set(&opts, "cookies", c->cookies, 0); ++ av_dict_set(&opts, "headers", c->headers, 0); // (kow|mitm) + + ret = avio_open2(&in, url, AVIO_FLAG_READ, + c->interrupt_callback, &opts); +@@ -346,6 +348,7 @@ static int open_input(HLSContext *c, struct variant *var) + // broker prior HTTP options that should be consistent across requests + av_dict_set(&opts, "user-agent", c->user_agent, 0); + av_dict_set(&opts, "cookies", c->cookies, 0); ++ av_dict_set(&opts, "headers", c->headers, 0); // (kow|mitm) + av_dict_set(&opts, "seekable", "0", 0); + + if (seg->key_type == KEY_NONE) { +@@ -494,6 +497,12 @@ static int hls_read_header(AVFormatContext *s) + av_opt_get(u->priv_data, "cookies", 0, (uint8_t**)&(c->cookies)); + if (c->cookies && !strlen(c->cookies)) + av_freep(&c->cookies); ++ ++ // get the previous headers & set back to null if string size is zero (kow|mitm) ++ av_freep(&c->headers); ++ av_opt_get(u->priv_data, "headers", 0, (uint8_t**)&(c->headers)); ++ if (c->headers && !strlen(c->headers)) ++ av_freep(&c->headers); + } + + if ((ret = parse_playlist(c, s->filename, NULL, s->pb)) < 0) +-- +1.8.4