ffmpeg: free last sub when using -fix_sub_duration.

Fix trac ticket #2242.

Note: under valid circumstances, when using -fix_sub_duration,
the last subtitle is a dummy termination packet, with no
allocated memory.
lavc/libopusenc: report an error if global_quality is set.
build: fix iconv detection on some systems.

This at least fix the build on CentOS.
ffplay: signal seek event to read thread

Improves seek delay.

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: drop remaining frames in current audio avpacket when seeking

Fixes ticket #1928.

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: only quit from audio_decode_frame before decoding when paused

This way the audio clock is updated to a proper value even when the video is
paused.

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: return true for pictq_prev_picture if it was successful

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: allow frame dropping if we redisplay an already displayed frame

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: if audio or video clock is invalid return NAN

This helps us not to make bad decision (frame dropping, audio compensation)
right after seeking when we do not know yet the recent audio or video clock.

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: use NAN to signal invalid external clock

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: add option to disable subtitling

Fixes ticket #2201.

Signed-off-by: Marton Balint <cus@passwd.hu>
ffplay: do not cycle through unavailable show modes

Fixes ticket #2200.

Signed-off-by: Marton Balint <cus@passwd.hu>
lavf/concatdec: define "ffcat" and "ffconcat" extensions
lavf/utils: add support for special characters encoding in URL

In particular, fix trac ticket #2031.

Signed-off-by: Senthilnathan M <senthilnathan.maadasamy@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
build: make iconv build configurable.
Revert "lavf/utils: add support for special characters encoding in URL"

This reverts commit 4a8fc1d83b1b55e1ac533644168018ebeec0c732.

The commit caused null pointer derefernces when using udp://
after i fixed that it caused ffmpeg to get stuck and remapped
arguments like ?ttl=255 -> ?ttl%3d255

I dont want to leave this broken thus temporary revert so we all
have some time to look at this without half the network protocols
being broken in the meantime
Merge remote-tracking branch 'cus/stable'

* cus/stable:
  ffplay: do not cycle through unavailable show modes
  ffplay: add option to disable subtitling
  ffplay: use NAN to signal invalid external clock
  ffplay: if audio or video clock is invalid return NAN
  ffplay: allow frame dropping if we redisplay an already displayed frame
  ffplay: return true for pictq_prev_picture if it was successful
  ffplay: only quit from audio_decode_frame before decoding when paused
  ffplay: drop remaining frames in current audio avpacket when seeking
  ffplay: signal seek event to read thread

Merged-by: Michael Niedermayer <michaelni@gmx.at>