Merge commit '2c328a907978b61949fd20f7c991803174337855'

* commit '2c328a907978b61949fd20f7c991803174337855':
  pixdesc: add a function for counting planes in a pixel format.
  avplay: remove the -debug option.
  Revert "asfenc: return error on negative timestamp"

Conflicts:
	doc/APIchanges
	doc/ffplay.texi
	ffplay.c
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/13/head
Michael Niedermayer 12 years ago
commit 17ebef2fc8
  1. 3
      doc/APIchanges
  2. 8
      libavformat/asfenc.c
  3. 15
      libavutil/pixdesc.c
  4. 6
      libavutil/pixdesc.h
  5. 4
      libavutil/version.h

@ -144,6 +144,9 @@ API changes, most recent first:
2012-03-26 - a67d9cf - lavfi 2.66.100 2012-03-26 - a67d9cf - lavfi 2.66.100
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions. Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
2013-xx-xx - lavu 52.9.0 - pixdesc.h
Add av_pix_fmt_count_planes() function for counting planes in a pixel format.
2013-xx-xx - lavfi 3.6.0 2013-xx-xx - lavfi 3.6.0
Add AVFilterGraph.nb_filters, deprecate AVFilterGraph.filter_count. Add AVFilterGraph.nb_filters, deprecate AVFilterGraph.filter_count.

@ -804,14 +804,6 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
flags &= ~AV_PKT_FLAG_KEY; flags &= ~AV_PKT_FLAG_KEY;
pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts; pts = (pkt->pts != AV_NOPTS_VALUE) ? pkt->pts : pkt->dts;
if (pts < 0) {
av_log(s, AV_LOG_ERROR,
"Negative dts not supported stream %d, dts %"PRId64"\n",
pkt->stream_index, pts);
return AVERROR(ENOSYS);
}
assert(pts != AV_NOPTS_VALUE); assert(pts != AV_NOPTS_VALUE);
pts *= 10000; pts *= 10000;
asf->duration = FFMAX(asf->duration, pts + pkt->duration * 10000); asf->duration = FFMAX(asf->duration, pts + pkt->duration * 10000);

@ -1791,3 +1791,18 @@ int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt,
return 0; return 0;
} }
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
int i, planes[4] = { 0 }, ret = 0;
if (!desc)
return AVERROR(EINVAL);
for (i = 0; i < desc->nb_components; i++)
planes[desc->comp[i].plane] = 1;
for (i = 0; i < FF_ARRAY_ELEMS(planes); i++)
ret += planes[i];
return ret;
}

@ -233,5 +233,11 @@ enum AVPixelFormat av_pix_fmt_desc_get_id(const AVPixFmtDescriptor *desc);
int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int av_pix_fmt_get_chroma_sub_sample(enum AVPixelFormat pix_fmt,
int *h_shift, int *v_shift); int *h_shift, int *v_shift);
/**
* @return number of planes in pix_fmt, a negative AVERROR if pix_fmt is not a
* valid pixel format.
*/
int av_pix_fmt_count_planes(enum AVPixelFormat pix_fmt);
#endif /* AVUTIL_PIXDESC_H */ #endif /* AVUTIL_PIXDESC_H */

@ -75,8 +75,8 @@
*/ */
#define LIBAVUTIL_VERSION_MAJOR 52 #define LIBAVUTIL_VERSION_MAJOR 52
#define LIBAVUTIL_VERSION_MINOR 19 #define LIBAVUTIL_VERSION_MINOR 20
#define LIBAVUTIL_VERSION_MICRO 101 #define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \ LIBAVUTIL_VERSION_MINOR, \

Loading…
Cancel
Save