* commit '
ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b': (21 commits)
jvdec: set channel layout
iss: set channel layout
ipmovie: set channel layout
iff: set channel layout
idroqdec: set channel layout
gxfdec: set channel layout when applicable
gsmdec: set channel layout
flvdec: set channel layout
dv: set channel layout
dsicin: set channel layout
daud: set channel layout
cdxl: set channel layout
bmv: set channel layout
bink: set channel layout
bfi: set channel layout
bethsoftvid: set channel layout
apc: set channel layout
amr: set channel_layout
ppc: replace pointer casting with AV_COPY32
ppc: fix some unused variable warnings
...
Conflicts:
libavformat/amr.c
libavformat/iff.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Only mono files are supported.
*/
+
+#include "libavutil/avassert.h"
+ #include "libavutil/channel_layout.h"
#include "avformat.h"
#include "internal.h"
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
+ #include "libavutil/channel_layout.h"
#include "avformat.h"
static int daud_header(AVFormatContext *s) {
#include "internal.h"
#include "libavcodec/dv_profile.h"
#include "libavcodec/dvdata.h"
+ #include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
+#include "libavutil/timecode.h"
#include "dv.h"
+#include "libavutil/avassert.h"
struct DVDemuxContext {
const DVprofile* sys; /* Current DV profile. E.g.: 525/60, 625/50 */
return ret;
if (st->codec->codec_id == AV_CODEC_ID_AAC) {
MPEG4AudioConfig cfg;
- avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
- st->codec->extradata_size * 8, 1);
+ if (avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
+ st->codec->extradata_size * 8, 1) >= 0) {
st->codec->channels = cfg.channels;
+ st->codec->channel_layout = 0;
if (cfg.ext_sample_rate)
st->codec->sample_rate = cfg.ext_sample_rate;
else
* http://wiki.multimedia.cx/index.php?title=IFF
*/
- #include "libavcodec/bytestream.h"
+#include "libavutil/avassert.h"
+ #include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/dict.h"
++#include "libavcodec/bytestream.h"
#include "avformat.h"
#include "internal.h"
case ID_CHAN:
if (data_size < 4)
return AVERROR_INVALIDDATA;
- st->codec->channels = (avio_rb32(pb) < 6) ? 1 : 2;
+ if (avio_rb32(pb) < 6) {
+ st->codec->channels = 1;
+ st->codec->channel_layout = AV_CH_LAYOUT_MONO;
+ } else {
+ st->codec->channels = 2;
+ st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
+ }
break;
+ case ID_CAMG:
+ if (data_size < 4)
+ return AVERROR_INVALIDDATA;
+ screenmode = avio_rb32(pb);
+ break;
+
case ID_CMAP:
- st->codec->extradata_size = data_size;
- st->codec->extradata = av_malloc(data_size);
+ st->codec->extradata_size = data_size + IFF_EXTRA_VIDEO_SIZE;
+ st->codec->extradata = av_malloc(data_size + IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
- if (avio_read(pb, st->codec->extradata, data_size) < 0)
+ if (avio_read(pb, st->codec->extradata + IFF_EXTRA_VIDEO_SIZE, data_size) < 0)
return AVERROR(EIO);
break;