avplay: Always free find_stream_info options

CC: libav-stable@libav.org
Bug-Id: CID 1238794
avplay: Always free opts

CC: libav-stable@libav.org
Bug-Id: CID 733793
avprobe: Remove a pointless check

The element is always valid.

CC: libav-stable@libav.org
Bug-Id: CID 732276
avconv: fix leak in filter error

CC: libav-stable@libav.org
Bug-Id: CID 1005311
avconv: check return value

CC: libav-stable@libav.org
Bug-Id: CID 1224275
avformat: Make avformat_free_context handle NULL

Work as the other free()-like functions.

Bug-Id: CID 1087081
CC: libav-stable@libav.org
cmdutils: Use the correct guard

The OptionDef arrays are terminated with a { NULL } element not NULL.

CC: libav-stable@libav.org
Bug-Id: CID 703769
rtmpproto: Add function to read a number response

Packets that contain a number as a result to a rtmp function call are
structured the same way (String, Number, Null, Number). This new method
also includes more bounds checks to better handle packets that are not
structured as expected.

Signed-off-by: Martin Storsjö <martin@martin.st>
rtmpproto: Add getStreamLength call to query duration

In (non-live) streams with no metadata, the duration of a stream can
be retrieved by calling the RTMP function getStreamLength with the
playpath. The server will return a positive duration upon the request if
the duration is known, otherwise either no response or a duration of 0
will be returned.

Signed-off-by: Martin Storsjö <martin@martin.st>
Merge commit 'cf83c0173917a44b89a25ea2b435429bbf9ee767'

* commit 'cf83c0173917a44b89a25ea2b435429bbf9ee767':
  avplay: Always free find_stream_info options

Conflicts:
	ffplay.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'e58a140cf91d1a9cdfa3115d73c923dab0e9e7dc'

* commit 'e58a140cf91d1a9cdfa3115d73c923dab0e9e7dc':
  avplay: Always free opts

Conflicts:
	ffplay.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'aeb23fc4549a25ef32ff085d2a76227f90caf403'

* commit 'aeb23fc4549a25ef32ff085d2a76227f90caf403':
  avprobe: Remove a pointless check

Conflicts:
	avprobe.c

No change as the code does not exist in ffprobe

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'c802a2e718fb3619291f310f851f1a1cdcf4f581'

* commit 'c802a2e718fb3619291f310f851f1a1cdcf4f581':
  avconv: fix leak in filter error

Conflicts:
	ffmpeg_filter.c

See: 14369f59c5ad1fb817fb4d94073f31cccf12b556
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'c92965dbfbb7e2b49df14db2fd0e23a29295730a'

* commit 'c92965dbfbb7e2b49df14db2fd0e23a29295730a':
  avconv: check return value

Conflicts:
	ffmpeg.c

See: 4930cd13d634d5f4e284de3a955d5c6a84fd65e2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '0db6bbb24c1a9f6b5527f460361a5a4132248eee'

* commit '0db6bbb24c1a9f6b5527f460361a5a4132248eee':
  avformat: Make avformat_free_context handle NULL

See: ee23dcf534801931c13f9f534586b56e231d3085
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '47e3e1097e09da7f973908e09df15e3bb7c5e1f4'

* commit '47e3e1097e09da7f973908e09df15e3bb7c5e1f4':
  cmdutils: Use the correct guard

Conflicts:
	cmdutils.c

See: 35daf3ca8173f80f200860e06a410ced31a8b360
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '324b23dde1bc8638959eb32419c95a93906db272'

* commit '324b23dde1bc8638959eb32419c95a93906db272':
  rtmpproto: Add function to read a number response

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'e65c776d18dc14df8a279e017760862f9fc8763b'

* commit 'e65c776d18dc14df8a279e017760862f9fc8763b':
  rtmpproto: Add getStreamLength call to query duration

Merged-by: Michael Niedermayer <michaelni@gmx.at>
gitignore: add test_copy.ffmeta

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