aboutsummaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer2011-04-29 04:29:21 +0200
committerMichael Niedermayer2011-04-29 04:29:21 +0200
commit455ce979d0793096662d139e996107a527617832 (patch)
tree0d3fb5dba727b7f07222c26ac333034a224898be /libavformat
parentf0f3425311ea88cf4ff24fffea0b679f54508c1c (diff)
parent5b81e295931bad4dac0af29333b4e2a203b3f4d4 (diff)
Merge remote branch 'qatar/master'
* qatar/master: LOTS of duplicates ... avio: Fix the deprecated fallback URL-prefixed open flags avoid duplicate -lm in .pc files mpeg12: terminate mpeg2_video_profiles arrays network: Check POLLERR and POLLHUP in ff_network_wait_fd mpegtsenc: make PMT PID really start on pmt_start_pid nut format: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE rawvideo codec: support PIX_FMT_BGR48LE and PIX_FMT_BGR48BE hflip: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats crop: make the filter accept PIX_FMT_BGR48LE and PIX_FMT_BGR48BE pixel formats libswcale: PIX_FMT_BGR48LE and PIX_FMT_BGR48BE scaler implementation Conflicts: configure libswscale/swscale.h tests/ref/lavf/ts Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avio.h6
-rw-r--r--libavformat/mpegtsenc.c2
-rw-r--r--libavformat/network.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/libavformat/avio.h b/libavformat/avio.h
index ba4fc2351b..07d127fd95 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -150,9 +150,9 @@ attribute_deprecated int url_poll(URLPollEntry *poll_table, int n, int timeout);
* constants, optionally ORed with other flags.
* @{
*/
-#define URL_RDONLY 0 /**< read-only */
-#define URL_WRONLY 1 /**< write-only */
-#define URL_RDWR 2 /**< read-write */
+#define URL_RDONLY 1 /**< read-only */
+#define URL_WRONLY 2 /**< write-only */
+#define URL_RDWR (URL_RDONLY|URL_WRONLY) /**< read-write */
/**
* @}
*/
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index ccaa2f80aa..3ca743a2ba 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -421,7 +421,7 @@ static MpegTSService *mpegts_add_service(MpegTSWrite *ts,
service = av_mallocz(sizeof(MpegTSService));
if (!service)
return NULL;
- service->pmt.pid = ts->pmt_start_pid + ts->nb_services - 1;
+ service->pmt.pid = ts->pmt_start_pid + ts->nb_services;
service->sid = sid;
service->provider_name = av_strdup(provider_name);
service->name = av_strdup(name);
diff --git a/libavformat/network.h b/libavformat/network.h
index 74e6f0bbcc..f2a0c97d77 100644
--- a/libavformat/network.h
+++ b/libavformat/network.h
@@ -78,7 +78,7 @@ static inline int ff_network_wait_fd(int fd, int write)
struct pollfd p = { .fd = fd, .events = ev, .revents = 0 };
int ret;
ret = poll(&p, 1, 100);
- return ret < 0 ? ff_neterrno() : p.revents & ev ? 0 : AVERROR(EAGAIN);
+ return ret < 0 ? ff_neterrno() : p.revents & (ev | POLLERR | POLLHUP) ? 0 : AVERROR(EAGAIN);
}
static inline void ff_network_close(void)