Export data_to_hex() as private API in lavf, rename to ff_data_to_hex() and
move it from sdp.c into utils.c. Also add new header internal.h specifically for lavf-specific internal API. See discussion in "Realmedia patch" thread on mailinglist. Originally committed as revision 15002 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
		@@ -19,6 +19,7 @@
 | 
			
		||||
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 | 
			
		||||
 */
 | 
			
		||||
#include "avformat.h"
 | 
			
		||||
#include "internal.h"
 | 
			
		||||
#include "libavcodec/opt.h"
 | 
			
		||||
#include "libavutil/avstring.h"
 | 
			
		||||
#include "riff.h"
 | 
			
		||||
@@ -3212,6 +3213,27 @@ void url_split(char *proto, int proto_size,
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void digit_to_char(char *dst, uint8_t src)
 | 
			
		||||
{
 | 
			
		||||
    if (src < 10) {
 | 
			
		||||
        *dst = '0' + src;
 | 
			
		||||
    } else {
 | 
			
		||||
        *dst = 'A' + src - 10;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
char *ff_data_to_hex(char *buff, const uint8_t *src, int s)
 | 
			
		||||
{
 | 
			
		||||
    int i;
 | 
			
		||||
 | 
			
		||||
    for(i = 0; i < s; i++) {
 | 
			
		||||
        digit_to_char(buff + 2 * i, src[i] >> 4);
 | 
			
		||||
        digit_to_char(buff + 2 * i + 1, src[i] & 0xF);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return buff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void av_set_pts_info(AVStream *s, int pts_wrap_bits,
 | 
			
		||||
                     int pts_num, int pts_den)
 | 
			
		||||
{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user