From: Steinar H. Gunderson Date: Sat, 2 Oct 2010 18:31:20 +0000 (+0200) Subject: Merge branch 'master' of git://git.videolan.org/vlc X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=314d91aaf1fcd5807caf3be7ab2c7da78751f837;hp=98dede2c4cb2a8283290147606c257f9d37145f5;p=vlc Merge branch 'master' of git://git.videolan.org/vlc --- diff --git a/extras/package/macosx/Resources/shuffle_embedded.png b/extras/package/macosx/Resources/shuffle_embedded.png old mode 100755 new mode 100644 diff --git a/extras/package/macosx/Resources/shuffle_embedded_blue.png b/extras/package/macosx/Resources/shuffle_embedded_blue.png old mode 100755 new mode 100644 diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h index 8541768ff5..5b8c265f51 100644 --- a/include/vlc/libvlc.h +++ b/include/vlc/libvlc.h @@ -226,6 +226,14 @@ VLC_PUBLIC_API const char * libvlc_get_compiler(void); */ VLC_PUBLIC_API const char * libvlc_get_changeset(void); +/** + * Frees an heap allocation returned by a LibVLC function. + * If you know you're using the same underlying C run-time as the LibVLC + * implementation, then you can call ANSI C free() directly instead. + * + * \param ptr the pointer + */ +VLC_PUBLIC_API void libvlc_free( void *ptr ); /** \defgroup libvlc_event LibVLC asynchronous events * LibVLC emits asynchronous events. diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h index e8fe7a7a97..105090eafc 100644 --- a/include/vlc/libvlc_media_player.h +++ b/include/vlc/libvlc_media_player.h @@ -735,7 +735,7 @@ VLC_PUBLIC_API void libvlc_video_set_scale( libvlc_media_player_t *p_mi, float f * * \param p_mi the media player * \return the video aspect ratio or NULL if unspecified - * (the result must be released with free()). + * (the result must be released with free() or libvlc_free()). */ VLC_PUBLIC_API char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *p_mi ); diff --git a/modules/access/rtp/rtp.c b/modules/access/rtp/rtp.c old mode 100644 new mode 100755 index 32e13b3c10..c896270c0f --- a/modules/access/rtp/rtp.c +++ b/modules/access/rtp/rtp.c @@ -431,7 +431,6 @@ static void codec_decode (demux_t *demux, void *data, block_t *block) block_Release (block); } - static void *stream_init (demux_t *demux, const char *name) { return stream_DemuxNew (demux, name, demux->out); @@ -454,6 +453,11 @@ static void stream_decode (demux_t *demux, void *data, block_t *block) (void)demux; } +static void *demux_init (demux_t *demux) +{ + return stream_init (demux, demux->psz_demux); +} + /* * Static payload types handler */ @@ -679,7 +683,22 @@ int rtp_autodetect (demux_t *demux, rtp_session_t *session, break; default: - return -1; + /* + * If the rtp payload type is unknown then check demux if it is specified + */ + if ((strcmp(demux->psz_demux, "h264") == 0) || (strcmp(demux->psz_demux, "ts") == 0)) + { + msg_Dbg (demux, "rtp autodetect specified demux=%s", demux->psz_demux); + pt.init = demux_init; + pt.destroy = stream_destroy; + pt.decode = stream_decode; + pt.frequency = 90000; + break; + } + else + { + return -1; + } } rtp_add_type (demux, session, &pt); return 0; diff --git a/src/control/core.c b/src/control/core.c index 1411e9c082..745c85af64 100644 --- a/src/control/core.c +++ b/src/control/core.c @@ -159,3 +159,8 @@ const char * libvlc_get_changeset(void) extern const char psz_vlc_changeset[]; return psz_vlc_changeset; } + +void libvlc_free( void *ptr ) +{ + free( ptr ); +} diff --git a/src/libvlc.sym b/src/libvlc.sym index f635a689fb..363faff8dc 100644 --- a/src/libvlc.sym +++ b/src/libvlc.sym @@ -32,6 +32,7 @@ libvlc_event_manager_register_event_type libvlc_event_manager_release libvlc_event_send libvlc_event_type_name +libvlc_free libvlc_get_changeset libvlc_get_compiler libvlc_get_fullscreen diff --git a/test/samples/image.jpg b/test/samples/image.jpg old mode 100755 new mode 100644