Merge commit 'b85a5e87af4254b80913fe33591d96361f30832b'

* commit 'b85a5e87af4254b80913fe33591d96361f30832b':
  lavu: Add av_strnstr()
  h264: Allow discarding the cropping information from SPS

Conflicts:
	Changelog
	doc/APIchanges
	libavcodec/avcodec.h
	libavcodec/version.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-01-25 14:36:45 +01:00
9 changed files with 53 additions and 3 deletions

View File

@@ -65,6 +65,20 @@ char *av_stristr(const char *s1, const char *s2)
return NULL;
}
char *av_strnstr(const char *haystack, const char *needle, size_t hay_length)
{
size_t needle_len = strlen(needle);
if (!needle_len)
return haystack;
while (hay_length >= needle_len) {
hay_length--;
if (!memcmp(haystack, needle, needle_len))
return haystack;
haystack++;
}
return NULL;
}
size_t av_strlcpy(char *dst, const char *src, size_t size)
{
size_t len = 0;