[vlc-commits] Fix share/lua/README.txt HTTPd documentation
vlc | branch: master | Alejandro González | Thu Jun 21 19:52:31 2018 +0200| [9a52f71bc6ddfe0ba2bd0c80a8834717f7dbfdc1] | committer: Jean-Baptiste Kempf Fix share/lua/README.txt HTTPd documentation According to my code review and testing, the vlc.httpd() Lua method does not take any arguments and neither support HTTPS in the current VLC version. Also, the documentation doesn't make it clear on what type of Lua modules it's available, when it can only be used in the context of interfaces. Some code snippets that seem to support the findings mentioned above: modules/lua/intf.c#L258 modules/lua/libs/httpd.c#L82 Signed-off-by: Jean-Baptiste Kempf > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9a52f71bc6ddfe0ba2bd0c80a8834717f7dbfdc1 --- share/lua/README.txt | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/lua/README.txt b/share/lua/README.txt index c5a7d68642..6d6ee64cfc 100644 --- a/share/lua/README.txt +++ b/share/lua/README.txt @@ -99,11 +99,11 @@ Extension - deactivate(): Deactivate current extension (after the end of the current function). -HTTPd -- -http( host, port, [cert, key, ca, crl]): create a new HTTP (SSL) daemon. +HTTPd (only usable for interfaces) +-- +httpd(): create a new HTTP daemon. -local h = vlc.httpd( "localhost", 8080 ) +local h = vlc.httpd() h:handler( url, user, password, callback, data ) -- add a handler for given url. If user and password are non nil, they will be used to authenticate connecting clients. callback will be called to handle connections. The callback function takes 7 arguments: data, url, request, type, in, addr, host. It returns the reply as a string. h:file( url, mime, user, password, callback, data ) -- add a file for given url with given mime type. If user and password are non nil, they will be used to authenticate connecting clients. callback will be called to handle connections. The callback function takes 2 arguments: data and request. It returns the reply as a string. h:redirect( url_dst, url_src ): Redirect all connections from url_src to url_dst. ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] freetype: darwin: Fix heap buffer overflow
vlc/vlc-3.0 | branch: master | Marvin Scholz | Mon Jun 25 23:54:20 2018 +0200| [e843b313d039170c27143d6754dbb5eb3b3e6697] | committer: Jean-Baptiste Kempf freetype: darwin: Fix heap buffer overflow The old getCStringCopyForCFStringRef function had a flaw that would cause a heap-buffer overflow if the CFString easy obtaining of the pointer fails and the string contains characters that need more than one byte. To fix this, remove the old getCStringCopyForCFStringRef and use the recently added CFStringCopyUTF8CString instead, and generalized it to work with any encoding. Additionally add a check for the malloc result to prevent passing NULL to CFStringGetCString. Fix #20721 (cherry picked from commit e89663939f86bbb4d914060f87f2c129714b2416) Signed-off-by: Jean-Baptiste Kempf > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=e843b313d039170c27143d6754dbb5eb3b3e6697 --- modules/text_renderer/freetype/fonts/darwin.c | 83 +++ 1 file changed, 35 insertions(+), 48 deletions(-) diff --git a/modules/text_renderer/freetype/fonts/darwin.c b/modules/text_renderer/freetype/fonts/darwin.c index 121786d267..cba5fb21d2 100644 --- a/modules/text_renderer/freetype/fonts/darwin.c +++ b/modules/text_renderer/freetype/fonts/darwin.c @@ -42,32 +42,50 @@ char* getPathForFontDescription(CTFontDescriptorRef fontDescriptor); void addNewFontToFamily(filter_t *p_filter, CTFontDescriptorRef iter, char *path, vlc_family_t *family); -static char* getCStringCopyForCFStringRef(CFStringRef cfstring, CFStringEncoding encoding) +/* Obtains a copy of the contents of a CFString in specified encoding. + * Returns char* (must be freed by caller) or NULL on failure. + */ +static char* CFStringCopyCString(CFStringRef cfString, CFStringEncoding cfStringEncoding) { -// Try to get pointer directly -const char *cptr = CFStringGetCStringPtr(cfstring, encoding); -if (cptr) { -return strdup(cptr); +// Try the quick way to obtain the buffer +const char *tmpBuffer = CFStringGetCStringPtr(cfString, cfStringEncoding); + +if (tmpBuffer != NULL) { + return strdup(tmpBuffer); } -// If it fails, use CFStringGetCString -CFIndex len = CFStringGetLength(cfstring); -CFIndex size = CFStringGetMaximumSizeForEncoding(len, encoding); -char *buffer = calloc(len + 1, sizeof(char)); +// The quick way did not work, try the long way +CFIndex length = CFStringGetLength(cfString); +CFIndex maxSize = +CFStringGetMaximumSizeForEncoding(length, cfStringEncoding); -if (CFStringGetCString(cfstring, buffer, size, encoding)) { -return buffer; -} else { -free(buffer); +// If result would exceed LONG_MAX, kCFNotFound is returned +if (unlikely(maxSize == kCFNotFound)) { return NULL; } + +// Account for the null terminator +maxSize++; + +char *buffer = (char *)malloc(maxSize); + +if (unlikely(buffer == NULL)) { +return NULL; +} + +// Copy CFString in requested encoding to buffer +Boolean success = CFStringGetCString(cfString, buffer, maxSize, cfStringEncoding); + +if (!success) +FREENULL(buffer); +return buffer; } char* getPathForFontDescription(CTFontDescriptorRef fontDescriptor) { CFURLRef url = CTFontDescriptorCopyAttribute(fontDescriptor, kCTFontURLAttribute); CFStringRef path = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle); -char *retPath = getCStringCopyForCFStringRef(path, kCFStringEncodingUTF8); +char *retPath = CFStringCopyCString(path, kCFStringEncodingUTF8); CFRelease(path); CFRelease(url); return retPath; @@ -149,11 +167,13 @@ const vlc_family_t *CoreText_GetFamily(filter_t *p_filter, const char *psz_famil coreTextFontCollection = CTFontCollectionCreateWithFontDescriptors(coreTextFontDescriptorsArray, 0); if (coreTextFontCollection == NULL) { +msg_Warn(p_filter,"CTFontCollectionCreateWithFontDescriptors (1) failed!"); goto end; } matchedFontDescriptions = CTFontCollectionCreateMatchingFontDescriptors(coreTextFontCollection); if (matchedFontDescriptions == NULL) { +msg_Warn(p_filter, "CTFontCollectionCreateMatchingFontDescriptors (2) failed!"); goto end; } @@ -200,39 +220,6 @@ end: return p_family; } -/* Obtains a copy of the contents of a CFString in UTF8 encoding. - * Returns char* (must be freed by caller) or NULL on failure. - */ -static char* CFStringCopyUTF8CString(CFStringRef cfString) -{ -// Try the quick way to obtain the buffer -const char *tmpBuffer = CFStringGetCStringPtr(cfString, kCFStringEncodingUTF8); - -if (tmpBuffer != NULL) { - return strdup(tmpBuffer); -} - -// The quick way did not work, try the long way -CFIndex length = CFStringGetLength(cfString); -CFIndex maxSize = -CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8); - -// If res
[vlc-commits] misc: securetransport: Check malloc result
vlc | branch: master | Marvin Scholz | Mon Jun 25 23:55:47 2018 +0200| [c4113a976cbf5dd7125d26fa3a503e2df9b9a1b3] | committer: Marvin Scholz misc: securetransport: Check malloc result Add a check for the malloc result to prevent passing NULL to CFStringGetCString. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4113a976cbf5dd7125d26fa3a503e2df9b9a1b3 --- modules/misc/securetransport.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/modules/misc/securetransport.c b/modules/misc/securetransport.c index 7bf8e9e566..4cafc30d3a 100644 --- a/modules/misc/securetransport.c +++ b/modules/misc/securetransport.c @@ -93,6 +93,12 @@ static char* CFStringCopyASCIICString(CFStringRef cfString) maxSize++; char *buffer = (char *)malloc(maxSize); + +if (unlikely(buffer == NULL)) { +return NULL; +} + +// Copy CFString in requested encoding to buffer Boolean success = CFStringGetCString(cfString, buffer, maxSize, kCFStringEncodingASCII); if (!success) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] freetype: darwin: Fix heap buffer overflow
vlc | branch: master | Marvin Scholz | Mon Jun 25 23:54:20 2018 +0200| [e89663939f86bbb4d914060f87f2c129714b2416] | committer: Marvin Scholz freetype: darwin: Fix heap buffer overflow The old getCStringCopyForCFStringRef function had a flaw that would cause a heap-buffer overflow if the CFString easy obtaining of the pointer fails and the string contains characters that need more than one byte. To fix this, remove the old getCStringCopyForCFStringRef and use the recently added CFStringCopyUTF8CString instead, and generalized it to work with any encoding. Additionally add a check for the malloc result to prevent passing NULL to CFStringGetCString. Fix #20721 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e89663939f86bbb4d914060f87f2c129714b2416 --- modules/text_renderer/freetype/fonts/darwin.c | 83 +++ 1 file changed, 35 insertions(+), 48 deletions(-) diff --git a/modules/text_renderer/freetype/fonts/darwin.c b/modules/text_renderer/freetype/fonts/darwin.c index 121786d267..cba5fb21d2 100644 --- a/modules/text_renderer/freetype/fonts/darwin.c +++ b/modules/text_renderer/freetype/fonts/darwin.c @@ -42,32 +42,50 @@ char* getPathForFontDescription(CTFontDescriptorRef fontDescriptor); void addNewFontToFamily(filter_t *p_filter, CTFontDescriptorRef iter, char *path, vlc_family_t *family); -static char* getCStringCopyForCFStringRef(CFStringRef cfstring, CFStringEncoding encoding) +/* Obtains a copy of the contents of a CFString in specified encoding. + * Returns char* (must be freed by caller) or NULL on failure. + */ +static char* CFStringCopyCString(CFStringRef cfString, CFStringEncoding cfStringEncoding) { -// Try to get pointer directly -const char *cptr = CFStringGetCStringPtr(cfstring, encoding); -if (cptr) { -return strdup(cptr); +// Try the quick way to obtain the buffer +const char *tmpBuffer = CFStringGetCStringPtr(cfString, cfStringEncoding); + +if (tmpBuffer != NULL) { + return strdup(tmpBuffer); } -// If it fails, use CFStringGetCString -CFIndex len = CFStringGetLength(cfstring); -CFIndex size = CFStringGetMaximumSizeForEncoding(len, encoding); -char *buffer = calloc(len + 1, sizeof(char)); +// The quick way did not work, try the long way +CFIndex length = CFStringGetLength(cfString); +CFIndex maxSize = +CFStringGetMaximumSizeForEncoding(length, cfStringEncoding); -if (CFStringGetCString(cfstring, buffer, size, encoding)) { -return buffer; -} else { -free(buffer); +// If result would exceed LONG_MAX, kCFNotFound is returned +if (unlikely(maxSize == kCFNotFound)) { return NULL; } + +// Account for the null terminator +maxSize++; + +char *buffer = (char *)malloc(maxSize); + +if (unlikely(buffer == NULL)) { +return NULL; +} + +// Copy CFString in requested encoding to buffer +Boolean success = CFStringGetCString(cfString, buffer, maxSize, cfStringEncoding); + +if (!success) +FREENULL(buffer); +return buffer; } char* getPathForFontDescription(CTFontDescriptorRef fontDescriptor) { CFURLRef url = CTFontDescriptorCopyAttribute(fontDescriptor, kCTFontURLAttribute); CFStringRef path = CFURLCopyFileSystemPath(url, kCFURLPOSIXPathStyle); -char *retPath = getCStringCopyForCFStringRef(path, kCFStringEncodingUTF8); +char *retPath = CFStringCopyCString(path, kCFStringEncodingUTF8); CFRelease(path); CFRelease(url); return retPath; @@ -149,11 +167,13 @@ const vlc_family_t *CoreText_GetFamily(filter_t *p_filter, const char *psz_famil coreTextFontCollection = CTFontCollectionCreateWithFontDescriptors(coreTextFontDescriptorsArray, 0); if (coreTextFontCollection == NULL) { +msg_Warn(p_filter,"CTFontCollectionCreateWithFontDescriptors (1) failed!"); goto end; } matchedFontDescriptions = CTFontCollectionCreateMatchingFontDescriptors(coreTextFontCollection); if (matchedFontDescriptions == NULL) { +msg_Warn(p_filter, "CTFontCollectionCreateMatchingFontDescriptors (2) failed!"); goto end; } @@ -200,39 +220,6 @@ end: return p_family; } -/* Obtains a copy of the contents of a CFString in UTF8 encoding. - * Returns char* (must be freed by caller) or NULL on failure. - */ -static char* CFStringCopyUTF8CString(CFStringRef cfString) -{ -// Try the quick way to obtain the buffer -const char *tmpBuffer = CFStringGetCStringPtr(cfString, kCFStringEncodingUTF8); - -if (tmpBuffer != NULL) { - return strdup(tmpBuffer); -} - -// The quick way did not work, try the long way -CFIndex length = CFStringGetLength(cfString); -CFIndex maxSize = -CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8); - -// If result would exceed LONG_MAX, kCFNotFound is returned -if (unlikely(maxSize == kCFNotFound)) { -return NULL; -} - -
[vlc-commits] access: sftp: add ecdsa key matching for known_hosts
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Mon Jun 4 17:33:32 2018 +0200| [618252caea1641e2b86315514900f143d23e090e] | committer: Jean-Baptiste Kempf access: sftp: add ecdsa key matching for known_hosts (cherry picked from commit afee1e72a8e08866bbe35d1a57e859cac81052b4) Signed-off-by: Jean-Baptiste Kempf > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=618252caea1641e2b86315514900f143d23e090e --- modules/access/sftp.c | 12 1 file changed, 12 insertions(+) diff --git a/modules/access/sftp.c b/modules/access/sftp.c index 1219f573a1..5bc054d310 100644 --- a/modules/access/sftp.c +++ b/modules/access/sftp.c @@ -306,7 +306,19 @@ static int Open( vlc_object_t* p_this ) case LIBSSH2_HOSTKEY_TYPE_DSS: knownhost_fingerprint_algo = LIBSSH2_KNOWNHOST_KEY_SSHDSS; break; +#if LIBSSH2_VERSION_NUM >= 0x010801 +case LIBSSH2_HOSTKEY_TYPE_ECDSA_256: +knownhost_fingerprint_algo = LIBSSH2_KNOWNHOST_KEY_ECDSA_256; +break; + +case LIBSSH2_HOSTKEY_TYPE_ECDSA_384: +knownhost_fingerprint_algo = LIBSSH2_KNOWNHOST_KEY_ECDSA_384; +break; +case LIBSSH2_HOSTKEY_TYPE_ECDSA_521: +knownhost_fingerprint_algo = LIBSSH2_KNOWNHOST_KEY_ECDSA_521; +break; +#endif default: msg_Err( p_access, "Host uses unrecognized session-key algorithm" ); libssh2_knownhost_free( ssh_knownhosts ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: avi: point directly to next parent chunk on empty
vlc/vlc-3.0 | branch: master | Francois Cartegnie | Fri Jun 8 15:59:47 2018 +0200| [141fccdb7d26574ccf58e4cf139024eda678a4a1] | committer: Jean-Baptiste Kempf demux: avi: point directly to next parent chunk on empty refs #9056 #8413 ch01-20130719054942.avi REC000.avi MOVI.AVI (cherry picked from commit ba61c94a423e4248361f28de1262c85b9085d73a) Signed-off-by: Jean-Baptiste Kempf > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=141fccdb7d26574ccf58e4cf139024eda678a4a1 --- modules/demux/avi/libavi.c | 45 ++--- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/modules/demux/avi/libavi.c b/modules/demux/avi/libavi.c index 6b04dfb93e..a622b9a3cd 100644 --- a/modules/demux/avi/libavi.c +++ b/modules/demux/avi/libavi.c @@ -107,19 +107,8 @@ static int AVI_ChunkReadCommon( stream_t *s, avi_chunk_t *p_chk, return VLC_SUCCESS; } -static int AVI_NextChunk( stream_t *s, avi_chunk_t *p_chk ) +static int AVI_GotoNextChunk( stream_t *s, const avi_chunk_t *p_chk ) { -avi_chunk_t chk; - -if( !p_chk ) -{ -if( AVI_ChunkReadCommon( s, &chk, NULL ) ) -{ -return VLC_EGENERIC; -} -p_chk = &chk; -} - bool b_seekable = false; const uint64_t i_offset = AVI_ChunkEnd( p_chk ); if ( !vlc_stream_Control(s, STREAM_CAN_SEEK, &b_seekable) && b_seekable ) @@ -134,6 +123,22 @@ static int AVI_NextChunk( stream_t *s, avi_chunk_t *p_chk ) } } +static int AVI_NextChunk( stream_t *s, avi_chunk_t *p_chk ) +{ +avi_chunk_t chk; + +if( !p_chk ) +{ +if( AVI_ChunkReadCommon( s, &chk, NULL ) ) +{ +return VLC_EGENERIC; +} +p_chk = &chk; +} + +return AVI_GotoNextChunk( s, p_chk ); +} + / * * Functions to read chunks @@ -225,9 +230,11 @@ static int AVI_ChunkRead_list( stream_t *s, avi_chunk_t *p_container ) } } -msg_Dbg( (vlc_object_t*)s, "", (char*)&p_container->list.i_type ); +msg_Dbg( (vlc_object_t*)s, "%x", (char*)&p_container->list.i_type, i_ret ); + +if( i_ret == AVI_ZERO_FOURCC || i_ret == AVI_ZEROSIZED_CHUNK ) +return AVI_GotoNextChunk( s, p_container ); -if ( i_ret == AVI_ZERO_FOURCC ) return i_ret; return VLC_SUCCESS; } @@ -998,15 +1005,7 @@ int AVI_ChunkRead( stream_t *s, avi_chunk_t *p_chk, avi_chunk_t *p_father ) i_index = AVI_ChunkFunctionFind( p_chk->common.i_chunk_fourcc ); if( AVI_Chunk_Function[i_index].AVI_ChunkRead_function ) { -int i_return = AVI_Chunk_Function[i_index].AVI_ChunkRead_function( s, p_chk ); -if ( i_return == AVI_ZEROSIZED_CHUNK || i_return == AVI_ZERO_FOURCC ) -{ -if ( !p_father ) -return VLC_EGENERIC; -p_chk->common.i_chunk_fourcc = 0; -return AVI_NextChunk( s, ( i_return == AVI_ZEROSIZED_CHUNK ) ? p_chk : p_father ); -} -return i_return; +return AVI_Chunk_Function[i_index].AVI_ChunkRead_function( s, p_chk ); } else if( ( ((char*)&p_chk->common.i_chunk_fourcc)[0] == 'i' && ((char*)&p_chk->common.i_chunk_fourcc)[1] == 'x' ) || ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: mkv: fix more hvcC detection
vlc/vlc-3.0 | branch: master | Zhao Zhili | Mon Jun 11 20:54:37 2018 +0800| [87a83eb9f3cc010d0d1603bbb3976c69ce2d20be] | committer: Jean-Baptiste Kempf demux: mkv: fix more hvcC detection MKV files made by DivXMKVMux 9.8.12.1750 are broken too. FFmpeg hevc_parse.c did the same thing to workaround the issue. Signed-off-by: Francois Cartegnie (cherry picked from commit 6de3cec0ca402f0085372f6839cfb1d63c9afc38) Signed-off-by: Jean-Baptiste Kempf > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=87a83eb9f3cc010d0d1603bbb3976c69ce2d20be --- modules/demux/mkv/matroska_segment_parse.cpp | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp index 4bd4eaacee..f546413905 100644 --- a/modules/demux/mkv/matroska_segment_parse.cpp +++ b/modules/demux/mkv/matroska_segment_parse.cpp @@ -1593,17 +1593,13 @@ bool matroska_segment_c::TrackInit( mkv_track_t * p_tk ) /* HACK: if we found invalid format, made by mkvmerge < 16.0.0, * we try to fix it. They fixed it in 16.0.0. */ const char* app = vars.obj->psz_writing_application; -if( p_extra && p_extra[0] == 0 && app != NULL && -strncmp(app, "mkvmerge", sizeof("mkvmerge")-1) == 0 ) +if( p_extra && vars.p_tk->i_extra_data >= 3 && +p_extra[0] == 0 && (p_extra[1] != 0 || p_extra[2] > 1) ) { -int major_version; -if( sscanf(app, "mkvmerge v%d.", &major_version) && major_version < 16 ) -{ -msg_Dbg(vars.p_demuxer, -"Invalid HEVC reserved bits in mkv file" -"made by mkvmerge < v16.0.0 detected, fixing it"); -p_extra[0] = 0x01; -} +msg_Warn(vars.p_demuxer, +"Invalid HEVC reserved bits in mkv file " +"made by %s, fixing it", app ? app : "unknown app"); +p_extra[0] = 0x01; } fill_extra_data( vars.p_tk, 0 ); ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] demux: ts: fixed duration probing
vlc/vlc-3.0 | branch: master | Jeremy Vignelles | Thu May 24 17:25:39 2018 +0200| [c60e89a838c9ab18c4b4ccfebdbf9a6b65889b98] | committer: Jean-Baptiste Kempf demux: ts: fixed duration probing Symptoms: I have a recorded .ts file that is around 15 seconds long for testing. VLC can play the stream fine, but the displayed duration is 10s. When VLC reaches the end of the file, it seems to realize that there is more data and increases the duration as the file plays. Digging into ProbeEnd: I digged into the code and found the ProbeEnd method. It calls ProbeChunk, with output args (the pcr and a found boolean). If pcr == -1, the previous chunk is taken, until PROBE_MAX is reached. However, the i_pcr received from the ProbeChunk method is the pcr of the last packet, and not the pcr of the last packet with a pcr. It means that most of the time, the pcr is -1 and the previous chunk is read, even though b_found is true. What's the use of that condition? I removed it, please correct me if I'm wrong. The ProbeStart has the same suspicious condition, so I removed it too. I also saw the suspicious `i_pos > 0` which is always false at the first iteration. Signed-off-by: Francois Cartegnie (cherry picked from commit 584b75bbffe80818b929812652334c7be0b75b82) Signed-off-by: Jean-Baptiste Kempf > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=c60e89a838c9ab18c4b4ccfebdbf9a6b65889b98 --- modules/demux/mpeg/ts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c index f7c87a8531..549ea66c47 100644 --- a/modules/demux/mpeg/ts.c +++ b/modules/demux/mpeg/ts.c @@ -2103,7 +2103,7 @@ int ProbeStart( demux_t *p_demux, int i_program ) /* Go ahead one more chunk if end of file contained only stuffing packets */ i_probe_count += PROBE_CHUNK_COUNT; -} while( i_pos > 0 && (i_pcr == -1 || !b_found) && +} while( i_pos < i_stream_size && !b_found && i_probe_count < PROBE_MAX ); if( vlc_stream_Seek( p_sys->stream, i_initial_pos ) ) @@ -2135,7 +2135,7 @@ int ProbeEnd( demux_t *p_demux, int i_program ) /* Go ahead one more chunk if end of file contained only stuffing packets */ i_probe_count += PROBE_CHUNK_COUNT; -} while( i_pos > 0 && (i_pcr == -1 || !b_found) && +} while( i_pos > 0 && !b_found && i_probe_count < PROBE_MAX ); if( vlc_stream_Seek( p_sys->stream, i_initial_pos ) ) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Update NEWS
vlc/vlc-3.0 | branch: master | Jean-Baptiste Kempf | Mon Jun 25 21:52:26 2018 +0200| [30508325f481b4f31ac600337b530d14f2146e5d] | committer: Jean-Baptiste Kempf Update NEWS > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=30508325f481b4f31ac600337b530d14f2146e5d --- NEWS | 22 ++ 1 file changed, 22 insertions(+) diff --git a/NEWS b/NEWS index fcc70374b2..3e86405ac3 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,28 @@ Changes between 3.0.3 and 3.0.4: +Decoder: + * Blacklist some intel GPU when decoding HEVC + * Decode AV1 streams + +Demux: + * Improve FLV fps detection + * Fix some ogg/flac + +Audio Output: + * Improve iOS session management + * Improve macOS audio performance + +Video Output: + * Fix some crash in Direct3D11/Direct3D9 because of sensors + * Fix some broken DVD subtitles rendering + +Text renderer: + * Fix rendering of arabic fonts fallback on macOS + +Misc: + * Fix live555, macOS-UI, crash + * Change the extension registration Changes between 3.0.2 and 3.0.3: ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Contribs: update libaom to 1.0.0
vlc/vlc-3.0 | branch: master | Jean-Baptiste Kempf | Mon Jun 25 21:23:17 2018 +0200| [738da6c2737d2da93b24b7cce47944d45d10d8d3] | committer: Jean-Baptiste Kempf Contribs: update libaom to 1.0.0 (cherry picked from commit 0cb4c5493b6d748fb9ef277e27244d94631ae233) Signed-off-by: Jean-Baptiste Kempf > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=738da6c2737d2da93b24b7cce47944d45d10d8d3 --- contrib/src/aom/rules.mak | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/src/aom/rules.mak b/contrib/src/aom/rules.mak index abd5c37350..6ed9c822d3 100644 --- a/contrib/src/aom/rules.mak +++ b/contrib/src/aom/rules.mak @@ -1,6 +1,6 @@ # aom -AOM_VERSION := git -AOM_HASH := 6f49b5a214fa48c226be3bc28f5c597edb81ed8c +AOM_HASH := 3715bf25db5cdedbd8b49560903bad02d911c62f +AOM_VERSION := v1.0.0-$(AOM_HASH) AOM_GITURL := https://aomedia.googlesource.com/aom/+archive/$(AOM_HASH).tar.gz # Default disabled for now @@ -32,6 +32,7 @@ AOM_CONF := \ -DENABLE_EXAMPLES=OFF \ -DENABLE_TOOLS=OFF \ -DCONFIG_UNIT_TESTS=0 \ + -DENABLE_TESTS=OFF \ -DCONFIG_INSTALL_BINS=0 \ -DCONFIG_INSTALL_DOCS=0 \ -DCONFIG_DEPENDENCY_TRACKING=0 ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Contribs: update libaom to 1.0.0
vlc | branch: master | Jean-Baptiste Kempf | Mon Jun 25 21:23:17 2018 +0200| [0cb4c5493b6d748fb9ef277e27244d94631ae233] | committer: Jean-Baptiste Kempf Contribs: update libaom to 1.0.0 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0cb4c5493b6d748fb9ef277e27244d94631ae233 --- contrib/src/aom/rules.mak | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/src/aom/rules.mak b/contrib/src/aom/rules.mak index 76510fd62b..91b875ab0b 100644 --- a/contrib/src/aom/rules.mak +++ b/contrib/src/aom/rules.mak @@ -1,6 +1,6 @@ # aom -AOM_HASH := e2aa4019709af0520b79397a28934237b15d2fda -AOM_VERSION := git-$(AOM_HASH) +AOM_HASH := 3715bf25db5cdedbd8b49560903bad02d911c62f +AOM_VERSION := v1.0.0-$(AOM_HASH) AOM_GITURL := https://aomedia.googlesource.com/aom/+archive/$(AOM_HASH).tar.gz PKGS += aom @@ -37,6 +37,7 @@ AOM_CONF := \ -DENABLE_EXAMPLES=OFF \ -DENABLE_TOOLS=OFF \ -DCONFIG_UNIT_TESTS=0 \ + -DENABLE_TESTS=OFF \ -DCONFIG_INSTALL_BINS=0 \ -DCONFIG_INSTALL_DOCS=0 \ -DCONFIG_DEPENDENCY_TRACKING=0 ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] Contribs: update libaom to 1.0.0
vlc | branch: master | Jean-Baptiste Kempf | Mon Jun 25 21:23:17 2018 +0200| [721c216bf8faaf2205aacf744ab20b1c5e3ec82f] | committer: Jean-Baptiste Kempf Contribs: update libaom to 1.0.0 > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=721c216bf8faaf2205aacf744ab20b1c5e3ec82f --- contrib/src/aom/rules.mak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/src/aom/rules.mak b/contrib/src/aom/rules.mak index 76510fd62b..3032353e6c 100644 --- a/contrib/src/aom/rules.mak +++ b/contrib/src/aom/rules.mak @@ -1,6 +1,6 @@ # aom -AOM_HASH := e2aa4019709af0520b79397a28934237b15d2fda -AOM_VERSION := git-$(AOM_HASH) +AOM_HASH := 3715bf25db5cdedbd8b49560903bad02d911c62f +AOM_VERSION := v1.0.0-$(AOM_HASH) AOM_GITURL := https://aomedia.googlesource.com/aom/+archive/$(AOM_HASH).tar.gz PKGS += aom ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] dxva: allow per-vendor HEVC black listing
vlc | branch: master | Steve Lhomme | Mon Jun 25 15:20:57 2018 +0200| [9daba7a1f7f7c793fd36cbd5c0409c8b350c929c] | committer: Steve Lhomme dxva: allow per-vendor HEVC black listing > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9daba7a1f7f7c793fd36cbd5c0409c8b350c929c --- modules/codec/avcodec/d3d11va.c| 5 + modules/codec/avcodec/directx_va.h | 2 +- modules/codec/avcodec/dxva2.c | 5 + modules/codec/avcodec/dxva_blacklist.c | 29 - 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c index 4f7e9b899b..9f78f15280 100644 --- a/modules/codec/avcodec/d3d11va.c +++ b/modules/codec/avcodec/d3d11va.c @@ -558,10 +558,7 @@ static bool CanUseIntelHEVC(vlc_va_t *va) if (FAILED(hr)) return false; -if (adapterDesc.VendorId != GPU_MANUFACTURER_INTEL) -return true; - -return directx_va_canUseHevc( va, adapterDesc.DeviceId ); +return directx_va_canUseHevc( va, adapterDesc.VendorId, adapterDesc.DeviceId ); } static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *fmt) diff --git a/modules/codec/avcodec/directx_va.h b/modules/codec/avcodec/directx_va.h index 74c7443539..635d8e6eb6 100644 --- a/modules/codec/avcodec/directx_va.h +++ b/modules/codec/avcodec/directx_va.h @@ -82,6 +82,6 @@ int directx_va_Open(vlc_va_t *, directx_sys_t *); void directx_va_Close(vlc_va_t *, directx_sys_t *); int directx_va_Setup(vlc_va_t *, directx_sys_t *, const AVCodecContext *avctx, const es_format_t *, int flag_xbox); char *directx_va_GetDecoderName(const GUID *guid); -bool directx_va_canUseHevc(vlc_va_t *, UINT DeviceId); +bool directx_va_canUseHevc(vlc_va_t *, UINT VendorId, UINT DeviceId); #endif /* AVCODEC_DIRECTX_VA_H */ diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c index 6aa4160c1a..2c0b5940c5 100644 --- a/modules/codec/avcodec/dxva2.c +++ b/modules/codec/avcodec/dxva2.c @@ -506,10 +506,7 @@ static bool CanUseIntelHEVC(vlc_va_t *va) if (FAILED(hr)) return false; -if (identifier.VendorId != GPU_MANUFACTURER_INTEL) -return true; - -return directx_va_canUseHevc( va, identifier.DeviceId ); +return directx_va_canUseHevc( va, identifier.VendorId, identifier.DeviceId ); } static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *fmt) diff --git a/modules/codec/avcodec/dxva_blacklist.c b/modules/codec/avcodec/dxva_blacklist.c index 1b52d1736a..fb5e6c6b89 100644 --- a/modules/codec/avcodec/dxva_blacklist.c +++ b/modules/codec/avcodec/dxva_blacklist.c @@ -27,6 +27,8 @@ #include #include +#include "../../video_chroma/dxgi_fmt.h" + #define D3D_DecoderType IUnknown #define D3D_DecoderDevice IUnknown #define D3D_DecoderSurface IUnknown @@ -38,7 +40,7 @@ typedef struct #include "directx_va.h" -static UINT hevc_blacklist[] = { +static UINT IntelDevices[] = { /* Intel Broadwell GPUs with hybrid HEVC */ 0x1606, /* HD Graphics */ 0x160E, /* HD Graphics */ @@ -68,19 +70,36 @@ static UINT hevc_blacklist[] = { 0x0D22, /* Iris(TM) Pro Graphics 5200 */ 0x0D26, /* Iris(TM) Pro Graphics 5200 */ +0 +}; + +static struct { +UINT vendor; +const UINT *devices; +} hevc_blacklist[] = { +{ .vendor = GPU_MANUFACTURER_INTEL, .devices = IntelDevices }, }; -bool directx_va_canUseHevc(vlc_va_t *va, UINT DeviceId) +bool directx_va_canUseHevc(vlc_va_t *va, UINT VendorId, UINT DeviceId) { if (va->obj.force) return true; for (size_t i=0; ihttps://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] dxva: allow blacklisting for different codecs
vlc | branch: master | Steve Lhomme | Mon Jun 25 15:38:29 2018 +0200| [79c56aadae985ee55851f2755a351fb8ba9ded86] | committer: Steve Lhomme dxva: allow blacklisting for different codecs > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79c56aadae985ee55851f2755a351fb8ba9ded86 --- modules/codec/avcodec/d3d11va.c| 32 +-- modules/codec/avcodec/directx_va.h | 2 +- modules/codec/avcodec/dxva2.c | 26 - modules/codec/avcodec/dxva_blacklist.c | 102 - 4 files changed, 86 insertions(+), 76 deletions(-) diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c index 9f78f15280..95230bbe08 100644 --- a/modules/codec/avcodec/d3d11va.c +++ b/modules/codec/avcodec/d3d11va.c @@ -542,24 +542,8 @@ static int DxGetInputList(vlc_va_t *va, input_list_t *p_list) return VLC_SUCCESS; } -extern const GUID DXVA_ModeHEVC_VLD_Main; extern const GUID DXVA_ModeHEVC_VLD_Main10; extern const GUID DXVA_ModeVP9_VLD_10bit_Profile2; -static bool CanUseIntelHEVC(vlc_va_t *va) -{ -vlc_va_sys_t *sys = va->sys; -IDXGIAdapter *pAdapter = D3D11DeviceAdapter(sys->d3d_dev.d3ddevice); -if (!pAdapter) -return false; - -DXGI_ADAPTER_DESC adapterDesc; -HRESULT hr = IDXGIAdapter_GetDesc(pAdapter, &adapterDesc); -IDXGIAdapter_Release(pAdapter); -if (FAILED(hr)) -return false; - -return directx_va_canUseHevc( va, adapterDesc.VendorId, adapterDesc.DeviceId ); -} static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *fmt) { @@ -576,9 +560,21 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t * } #endif -if ((IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main) || - IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main10)) && !CanUseIntelHEVC(va)) +IDXGIAdapter *pAdapter = D3D11DeviceAdapter(sys->d3d_dev.d3ddevice); +if (!pAdapter) +return VLC_EGENERIC; + +DXGI_ADAPTER_DESC adapterDesc; +hr = IDXGIAdapter_GetDesc(pAdapter, &adapterDesc); +IDXGIAdapter_Release(pAdapter); +if (FAILED(hr)) +return VLC_EGENERIC; + +if (!directx_va_canUseDecoder(va, adapterDesc.VendorId, adapterDesc.DeviceId, input)) +{ +msg_Warn(va, "GPU blacklisted for %s codec", directx_va_GetDecoderName(input)); return VLC_EGENERIC; +} DXGI_FORMAT processorInput[5]; int idx = 0; diff --git a/modules/codec/avcodec/directx_va.h b/modules/codec/avcodec/directx_va.h index 635d8e6eb6..5e72f2188a 100644 --- a/modules/codec/avcodec/directx_va.h +++ b/modules/codec/avcodec/directx_va.h @@ -82,6 +82,6 @@ int directx_va_Open(vlc_va_t *, directx_sys_t *); void directx_va_Close(vlc_va_t *, directx_sys_t *); int directx_va_Setup(vlc_va_t *, directx_sys_t *, const AVCodecContext *avctx, const es_format_t *, int flag_xbox); char *directx_va_GetDecoderName(const GUID *guid); -bool directx_va_canUseHevc(vlc_va_t *, UINT VendorId, UINT DeviceId); +bool directx_va_canUseDecoder(vlc_va_t *, UINT VendorId, UINT DeviceId, const GUID *pCodec); #endif /* AVCODEC_DIRECTX_VA_H */ diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c index 2c0b5940c5..e410f54097 100644 --- a/modules/codec/avcodec/dxva2.c +++ b/modules/codec/avcodec/dxva2.c @@ -495,32 +495,26 @@ static int DxGetInputList(vlc_va_t *va, input_list_t *p_list) return VLC_SUCCESS; } -extern const GUID DXVA_ModeHEVC_VLD_Main; -extern const GUID DXVA_ModeHEVC_VLD_Main10; -static bool CanUseIntelHEVC(vlc_va_t *va) +static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *fmt) { +VLC_UNUSED(fmt); vlc_va_sys_t *sys = va->sys; D3DADAPTER_IDENTIFIER9 identifier; HRESULT hr = IDirect3D9_GetAdapterIdentifier(sys->hd3d.obj, sys->d3d_dev.adapterId, 0, &identifier); if (FAILED(hr)) -return false; - -return directx_va_canUseHevc( va, identifier.VendorId, identifier.DeviceId ); -} - -static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t *fmt) -{ -VLC_UNUSED(fmt); +return VLC_EGENERIC; -if ((IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main) || - IsEqualGUID(input,&DXVA_ModeHEVC_VLD_Main10)) && !CanUseIntelHEVC(va)) +if (!directx_va_canUseDecoder(va, identifier.VendorId, identifier.DeviceId, input)) +{ +msg_Warn(va, "GPU blacklisted for %s codec", directx_va_GetDecoderName(input)); return VLC_EGENERIC; +} int err = VLC_EGENERIC; UINT output_count = 0; D3DFORMAT *output_list = NULL; -if (FAILED(IDirectXVideoDecoderService_GetDecoderRenderTargets(va->sys->dx_sys.d3ddec, +if (FAILED(IDirectXVideoDecoderService_GetDecoderRenderTargets(sys->dx_sys.d3ddec, input, &output_count,
[vlc-commits] codec: add a specific source file to handle GPU blacklisting
vlc | branch: master | Steve Lhomme | Mon Jun 25 15:00:37 2018 +0200| [ec1313ce0a5a5b9c54f0fa94d0d11afe06de4a0e] | committer: Steve Lhomme codec: add a specific source file to handle GPU blacklisting > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ec1313ce0a5a5b9c54f0fa94d0d11afe06de4a0e --- modules/codec/Makefile.am | 6 ++- modules/codec/avcodec/directx_va.c | 49 --- modules/codec/avcodec/dxva_blacklist.c | 88 ++ 3 files changed, 92 insertions(+), 51 deletions(-) diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am index 573a8953c8..379c50833f 100644 --- a/modules/codec/Makefile.am +++ b/modules/codec/Makefile.am @@ -434,7 +434,8 @@ libdxva2_plugin_la_SOURCES = \ codec/avcodec/dxva2.c codec/avcodec/directx_va.c codec/avcodec/directx_va.h \ codec/avcodec/va_surface.c codec/avcodec/va_surface.h codec/avcodec/va_surface_internal.h \ packetizer/h264_nal.c packetizer/h264_nal.h \ - packetizer/hevc_nal.c packetizer/hevc_nal.h + packetizer/hevc_nal.c packetizer/hevc_nal.h \ + codec/avcodec/dxva_blacklist.c libdxva2_plugin_la_LIBADD = libd3d9_common.la $(LIBCOM) -lshlwapi -luuid if HAVE_AVCODEC_DXVA2 codec_LTLIBRARIES += libdxva2_plugin.la @@ -451,7 +452,8 @@ libd3d11va_plugin_la_SOURCES = \ codec/avcodec/d3d11va.c codec/avcodec/directx_va.c codec/avcodec/directx_va.h \ codec/avcodec/va_surface.c codec/avcodec/va_surface.h codec/avcodec/va_surface_internal.h \ packetizer/h264_nal.c packetizer/h264_nal.h \ - packetizer/hevc_nal.c packetizer/hevc_nal.h + packetizer/hevc_nal.c packetizer/hevc_nal.h \ + codec/avcodec/dxva_blacklist.c libd3d11va_plugin_la_LIBADD = libd3d11_common.la $(LIBCOM) -luuid if HAVE_WINSTORE libd3d11va_plugin_la_LIBADD += -ld3d11 diff --git a/modules/codec/avcodec/directx_va.c b/modules/codec/avcodec/directx_va.c index 935f3317e5..77240ec0b0 100644 --- a/modules/codec/avcodec/directx_va.c +++ b/modules/codec/avcodec/directx_va.c @@ -452,52 +452,3 @@ static int FindVideoServiceConversion(vlc_va_t *va, directx_sys_t *dx_sys, p_list.pf_release(&p_list); return err; } - -static UINT hevc_blacklist[] = { -/* Intel Broadwell GPUs with hybrid HEVC */ -0x1606, /* HD Graphics */ -0x160E, /* HD Graphics */ -0x1612, /* HD Graphics 5600 */ -0x1616, /* HD Graphics 5500 */ -0x161A, /* HD Graphics P5700 */ -0x161E, /* HD Graphics 5300 */ -0x1622, /* Iris Pro Graphics 6200 */ -0x1626, /* HD Graphics 6000 */ -0x162A, /* Iris Pro Graphics P6300 */ -0x162B, /* Iris Graphics 6100 */ - -0x0402, /* HD Graphics */ -0x0406, /* HD Graphics */ -0x040A, /* HD Graphics */ -0x0412, /* HD Graphics 4600 */ -0x0416, /* HD Graphics 4600 */ -0x041E, /* HD Graphics 4400 */ -0x041A, /* HD Graphics P4600/P4700 */ - -0x0A06, /* HD Graphics */ -0x0A0E, /* HD Graphics */ -0x0A16, /* HD Graphics Family */ -0x0A1E, /* HD Graphics Family */ -0x0A26, /* HD Graphics 5000 */ -0x0A2E, /* Iris(TM) Graphics 5100 */ - -0x0D22, /* Iris(TM) Pro Graphics 5200 */ -0x0D26, /* Iris(TM) Pro Graphics 5200 */ -}; - -bool directx_va_canUseHevc(vlc_va_t *va, UINT DeviceId) -{ -if (va->obj.force) -return true; - -for (size_t i=0; i + * + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include + +#define D3D_DecoderType IUnknown +#define D3D_DecoderDevice IUnknown +#define D3D_DecoderSurface IUnknown + +typedef struct +{ +void *dummy; +} picture_sys_t; + +#include "directx_va.h" + +static UINT hevc_blacklist[] = { +/* Intel Broadwell GPUs with hybrid HEVC */ +0x1606, /* HD Graphics */ +0x160E, /* HD Graphics */ +0x1612, /* HD Graphics 5600 */ +0x1616, /* HD Graphics 5500 */ +0x161A, /* HD Graphics P5700 */ +0x161E, /* HD Graphics 5300 */ +0x1622, /* Iris Pro Graphics 6200 */ +0x1626, /* HD Graphics 6000 */ +0x162A, /* Iris Pro Graphics P6300 */ +0x162B, /* Iris Graphics 6100 */ + +0x0402, /* HD Graphics */ +0x0406, /* HD Graphi
[vlc-commits] d3d11_fmt: keep the modified build number once and for all
vlc | branch: master | Steve Lhomme | Mon Jun 25 17:32:08 2018 +0200| [6dd231f7e007a93dace97b45cc5d015b5ebed929] | committer: Steve Lhomme d3d11_fmt: keep the modified build number once and for all > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6dd231f7e007a93dace97b45cc5d015b5ebed929 --- modules/video_chroma/d3d11_fmt.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c index aebf5befe6..a8543b0f57 100644 --- a/modules/video_chroma/d3d11_fmt.c +++ b/modules/video_chroma/d3d11_fmt.c @@ -204,6 +204,11 @@ void D3D11_GetDriverVersion(vlc_object_t *obj, d3d11_device_t *d3d_dev) d3d_dev->WDDM.revision = revision; d3d_dev->WDDM.build= build; msg_Dbg(obj, "%s WDDM driver %d.%d.%d.%d", DxgiVendorStr(adapterDesc.VendorId), wddm, d3d_features, revision, build); +if (adapterDesc.VendorId == GPU_MANUFACTURER_INTEL && revision >= 100) +{ +/* new Intel driver format */ +d3d_dev->WDDM.build += (revision - 100) * 1000; +} #endif } @@ -373,13 +378,6 @@ int D3D11CheckDriverVersion(d3d11_device_t *d3d_dev, UINT vendorId, const struct if (vendorId && adapterDesc.VendorId != vendorId) return VLC_SUCCESS; -int build = d3d_dev->WDDM.build; -if (adapterDesc.VendorId == GPU_MANUFACTURER_INTEL && d3d_dev->WDDM.revision >= 100) -{ -/* new Intel driver format */ -build += (d3d_dev->WDDM.revision - 100) * 1000; -} - if (min_ver->wddm) { if (d3d_dev->WDDM.wddm > min_ver->wddm) @@ -403,9 +401,9 @@ int D3D11CheckDriverVersion(d3d11_device_t *d3d_dev, UINT vendorId, const struct } if (min_ver->build) { -if (build > min_ver->build) +if (d3d_dev->WDDM.build > min_ver->build) return VLC_SUCCESS; -else if (build != min_ver->build) +else if (d3d_dev->WDDM.build != min_ver->build) return VLC_EGENERIC; } return VLC_SUCCESS; ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] dxva: allow blacklisting based on the driver build
vlc | branch: master | Steve Lhomme | Mon Jun 25 17:36:35 2018 +0200| [33cc4f2b1f9dace2b3a63098a458f3172fc6ae41] | committer: Steve Lhomme dxva: allow blacklisting based on the driver build Not used for now. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=33cc4f2b1f9dace2b3a63098a458f3172fc6ae41 --- modules/codec/avcodec/d3d11va.c| 3 +- modules/codec/avcodec/directx_va.h | 2 +- modules/codec/avcodec/dxva2.c | 9 +++- modules/codec/avcodec/dxva_blacklist.c | 76 -- 4 files changed, 56 insertions(+), 34 deletions(-) diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c index 95230bbe08..7244c29d88 100644 --- a/modules/codec/avcodec/d3d11va.c +++ b/modules/codec/avcodec/d3d11va.c @@ -570,7 +570,8 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t * if (FAILED(hr)) return VLC_EGENERIC; -if (!directx_va_canUseDecoder(va, adapterDesc.VendorId, adapterDesc.DeviceId, input)) +if (!directx_va_canUseDecoder(va, adapterDesc.VendorId, adapterDesc.DeviceId, + input, sys->d3d_dev.WDDM.build)) { msg_Warn(va, "GPU blacklisted for %s codec", directx_va_GetDecoderName(input)); return VLC_EGENERIC; diff --git a/modules/codec/avcodec/directx_va.h b/modules/codec/avcodec/directx_va.h index 5e72f2188a..335cca7bd3 100644 --- a/modules/codec/avcodec/directx_va.h +++ b/modules/codec/avcodec/directx_va.h @@ -82,6 +82,6 @@ int directx_va_Open(vlc_va_t *, directx_sys_t *); void directx_va_Close(vlc_va_t *, directx_sys_t *); int directx_va_Setup(vlc_va_t *, directx_sys_t *, const AVCodecContext *avctx, const es_format_t *, int flag_xbox); char *directx_va_GetDecoderName(const GUID *guid); -bool directx_va_canUseDecoder(vlc_va_t *, UINT VendorId, UINT DeviceId, const GUID *pCodec); +bool directx_va_canUseDecoder(vlc_va_t *, UINT VendorId, UINT DeviceId, const GUID *pCodec, UINT driverBuild); #endif /* AVCODEC_DIRECTX_VA_H */ diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c index e410f54097..e02295858c 100644 --- a/modules/codec/avcodec/dxva2.c +++ b/modules/codec/avcodec/dxva2.c @@ -505,7 +505,14 @@ static int DxSetupOutput(vlc_va_t *va, const GUID *input, const video_format_t * if (FAILED(hr)) return VLC_EGENERIC; -if (!directx_va_canUseDecoder(va, identifier.VendorId, identifier.DeviceId, input)) +UINT driverBuild = identifier.DriverVersion.LowPart & 0x; +if (identifier.VendorId == GPU_MANUFACTURER_INTEL && (identifier.DriverVersion.LowPart >> 16) >= 100) +{ +/* new Intel driver format */ +driverBuild += ((identifier.DriverVersion.LowPart >> 16) - 100) * 1000; +} +if (!directx_va_canUseDecoder(va, identifier.VendorId, identifier.DeviceId, + input, driverBuild)) { msg_Warn(va, "GPU blacklisted for %s codec", directx_va_GetDecoderName(input)); return VLC_EGENERIC; diff --git a/modules/codec/avcodec/dxva_blacklist.c b/modules/codec/avcodec/dxva_blacklist.c index 159c44b573..698aece161 100644 --- a/modules/codec/avcodec/dxva_blacklist.c +++ b/modules/codec/avcodec/dxva_blacklist.c @@ -43,9 +43,16 @@ typedef struct extern const GUID DXVA_ModeHEVC_VLD_Main; extern const GUID DXVA_ModeHEVC_VLD_Main10; +enum DriverTestCommand { +BLAnyDriver, +BLBelowBuild, /* driverBuild is the first driver version known to work */ +}; + struct decoders { const UINT deviceID; const GUID **decoder_list; +const enum DriverTestCommand cmd; +const UINT driverBuild; }; static const GUID *NoHEVC[] = { @@ -56,35 +63,36 @@ static const GUID *NoHEVC[] = { static struct decoders IntelDevices[] = { /* Intel Broadwell GPUs with hybrid HEVC */ -{ 0x1606, NoHEVC }, /* HD Graphics */ -{ 0x160E, NoHEVC }, /* HD Graphics */ -{ 0x1612, NoHEVC }, /* HD Graphics 5600 */ -{ 0x1616, NoHEVC }, /* HD Graphics 5500 */ -{ 0x161A, NoHEVC }, /* HD Graphics P5700 */ -{ 0x161E, NoHEVC }, /* HD Graphics 5300 */ -{ 0x1622, NoHEVC }, /* Iris Pro Graphics 6200 */ -{ 0x1626, NoHEVC }, /* HD Graphics 6000 */ -{ 0x162A, NoHEVC }, /* Iris Pro Graphics P6300 */ -{ 0x162B, NoHEVC }, /* Iris Graphics 6100 */ - -{ 0x0402, NoHEVC }, /* HD Graphics */ -{ 0x0406, NoHEVC }, /* HD Graphics */ -{ 0x040A, NoHEVC }, /* HD Graphics */ -{ 0x0412, NoHEVC }, /* HD Graphics 4600 */ -{ 0x0416, NoHEVC }, /* HD Graphics 4600 */ -{ 0x041E, NoHEVC }, /* HD Graphics 4400 */ -{ 0x041A, NoHEVC }, /* HD Graphics P4600/P4700 */ - -{ 0x0A06, NoHEVC }, /* HD Graphics */ -{ 0x0A0E, NoHEVC }, /* HD Graphics */ -{ 0x0A16, NoHEVC }, /* HD Graphics Family */ -{ 0x0A1E, NoHEVC }, /* HD Graphics Family */ -{ 0x0A26, NoHEVC }, /* HD Graphics 5000 */ -{ 0x0A2E, NoHEVC }, /* Iris(TM) Graphics 5100 */ - -{ 0x0D22, NoHEVC }, /* Iris(T
[vlc-commits] win32: remove manifest comment line
vlc | branch: master | Steve Lhomme | Mon Jun 25 16:55:16 2018 +0200| [90968f248ccf0862960079138ebd8a8512220cb1] | committer: Steve Lhomme win32: remove manifest comment line It breaks the binary which won't run on W10 (at least) > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=90968f248ccf0862960079138ebd8a8512220cb1 --- extras/package/win32/vlc.exe.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/package/win32/vlc.exe.manifest b/extras/package/win32/vlc.exe.manifest index 33b05c..7b826810b5 100644 --- a/extras/package/win32/vlc.exe.manifest +++ b/extras/package/win32/vlc.exe.manifest @@ -32,9 +32,9 @@ - + ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits
[vlc-commits] contrib: lame: Avoid the dependency on gettext
vlc | branch: master | Martin Storsjö | Sat Jun 23 00:39:14 2018 +0300| [f942eac0d25cb6921324ffa1b3c7d7436a27cf5f] | committer: Martin Storsjö contrib: lame: Avoid the dependency on gettext Modify configure.in before reconfiguring, to avoid requiring the dependency on gettext. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f942eac0d25cb6921324ffa1b3c7d7436a27cf5f --- contrib/src/lame/rules.mak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/src/lame/rules.mak b/contrib/src/lame/rules.mak index f4c4b1d1bb..45186e2505 100644 --- a/contrib/src/lame/rules.mak +++ b/contrib/src/lame/rules.mak @@ -3,9 +3,6 @@ LAME_VERSION := 3.99.5 LAME_URL := $(SF)/lame/lame-$(LAME_VERSION).tar.gz -# gettext is necessary for $(RECONF) of lame -DEPS_lame = gettext - $(TARBALLS)/lame-$(LAME_VERSION).tar.gz: $(call download_pkg,$(LAME_URL),lame) @@ -16,6 +13,9 @@ lame: lame-$(LAME_VERSION).tar.gz .sum-lame $(APPLY) $(SRC)/lame/lame-forceinline.patch $(APPLY) $(SRC)/lame/sse.patch $(APPLY) $(SRC)/lame/lame-outdated-autotools.patch + # Avoid relying on iconv.m4 from gettext, when reconfiguring. + # This is only used by the frontend which we disable. + cd $(UNPACK_DIR) && sed -i.orig 's/^AM_ICONV/#&/' configure.in $(UPDATE_AUTOCONFIG) $(MOVE) ___ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits