Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:smarty12:multimedia
ffmpeg-4
_service:download_url:ffmpeg-kodi.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:download_url:ffmpeg-kodi.patch of Package ffmpeg-4
diff --git a/Makefile b/Makefile index 0cd0a1d6f2d5..66373a1e6fe3 100644 --- a/Makefile +++ b/Makefile @@ -113,7 +113,7 @@ GIT_LOG = $(SRC_PATH)/.git/logs/HEAD .version: M=@ libavutil/ffversion.h .version: - $(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h $(EXTRA_VERSION) + $(M)$(VERSION_SH) $(SRC_PATH) libavutil/ffversion.h Kodi $(Q)touch .version # force version.sh to run whenever version might have changed diff --git a/ffbuild/common.mak b/ffbuild/common.mak index eb41b05ee661..cf74fef42549 100644 --- a/ffbuild/common.mak +++ b/ffbuild/common.mak @@ -80,7 +80,7 @@ COMPILE_NVCC = $(call COMPILE,NVCC) %.o: %.asm $(COMPILE_X86ASM) - -$(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@) + $(if $(STRIP), $(if $(ASMSTRIPFLAGS), $(STRIP) $(ASMSTRIPFLAGS) $@)) %.o: %.rc $(WINDRES) $(IFLAGS) --preprocessor "$(DEPWINDRES) -E -xc-header -DRC_INVOKED $(CC_DEPFLAGS)" -o $@ $< diff --git a/ffbuild/version.sh b/ffbuild/version.sh index edc4dd33c542..239a138ca77d 100755 --- a/ffbuild/version.sh +++ b/ffbuild/version.sh @@ -2,6 +2,7 @@ # Usage: version.sh <ffmpeg-root-dir> <output-version.h> <extra-version> +if [ -d $1/.git ]; then # only check for a git rev, if the src tree is in a git repo # check for git short hash if ! test "$revision"; then if (cd "$1" && grep git RELEASE 2> /dev/null >/dev/null) ; then @@ -27,6 +28,7 @@ if [ -z "$revision" ]; then git_hash="${srcdir##*-}";; esac fi +fi # no revision number found test "$revision" || revision=$(cd "$1" && cat RELEASE 2> /dev/null) diff --git a/libavcodec/dxva2.c b/libavcodec/dxva2.c index 32416112bfd9..dfae50044488 100644 --- a/libavcodec/dxva2.c +++ b/libavcodec/dxva2.c @@ -771,16 +771,18 @@ unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, #if CONFIG_D3D11VA if (avctx->pix_fmt == AV_PIX_FMT_D3D11) return (intptr_t)frame->data[1]; - if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD) { + if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD && surface) { D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC viewDesc; ID3D11VideoDecoderOutputView_GetDesc((ID3D11VideoDecoderOutputView*) surface, &viewDesc); return viewDesc.Texture2D.ArraySlice; } #endif #if CONFIG_DXVA2 - for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) { - if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD && ctx->dxva2.surface[i] == surface) - return i; + if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD) { + for (i = 0; i < DXVA_CONTEXT_COUNT(avctx, ctx); i++) { + if (ctx->dxva2.surface[i] == surface) + return i; + } } #endif diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index 5b23b28f1202..c0a8d80f3b1c 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -504,6 +504,14 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx) if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) return -1; + + // Wait for an I-frame before start decoding. Workaround for ATI UVD and UVD+ GPUs + if (!h->got_first_iframe) { + if (!(ctx_pic->pp.wBitFields & (1 << 15))) + return -1; + h->got_first_iframe = 1; + } + ret = ff_dxva2_common_end_frame(avctx, h->cur_pic_ptr->f, &ctx_pic->pp, sizeof(ctx_pic->pp), &ctx_pic->qm, sizeof(ctx_pic->qm), diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 0790f32a4369..af9ec9789b0c 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -929,6 +929,7 @@ static int h264_slice_header_init(H264Context *h) h->first_field = 0; h->prev_interlaced_frame = 1; + h->got_first_iframe = 0; init_scan_tables(h); ret = ff_h264_alloc_tables(h); diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 7494c7a8f2ce..33e1056d872a 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -486,6 +486,7 @@ void ff_h264_flush_change(H264Context *h) h->next_outputed_poc = INT_MIN; h->prev_interlaced_frame = 1; + h->got_first_iframe = 0; idr(h); h->poc.prev_frame_num = -1; diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 1d9723260dd3..b0b42b7672b4 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -533,6 +533,8 @@ typedef struct H264Context { * slices) anymore */ int setup_finished; + int got_first_iframe; + int cur_chroma_format_idc; int cur_bit_depth_luma; int16_t slice_row[MAX_SLICES]; ///< to detect when MAX_SLICES is too low diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index 5854587a255a..f12fdc457a41 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -317,6 +317,11 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx) H264SliceContext *sl = &h->slice_ctx[0]; int ret; + if (pic->nb_slices == 0) { + ret = AVERROR_INVALIDDATA; + goto finish; + } + ret = ff_vaapi_decode_issue(avctx, pic); if (ret < 0) goto finish; diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 32dff2319c51..3a79d1b1758b 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -57,7 +57,7 @@ static int rtsp_read_close(AVFormatContext *s) { RTSPState *rt = s->priv_data; - if (!(rt->rtsp_flags & RTSP_FLAG_LISTEN)) + if (!(rt->rtsp_flags & RTSP_FLAG_LISTEN) && rt->rtsp_hd_out) ff_rtsp_send_cmd_async(s, "TEARDOWN", rt->control_uri, NULL); ff_rtsp_close_streams(s);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor