~ubuntu-branches/debian/sid/ffmpeg/sid

« back to all changes in this revision

Viewing changes to debian/patches/hls-only-seek-if-there-is-an-offset.patch

  • Committer: Package Import Robot
  • Author(s): Andreas Cadhalpun, Balint Reczey, Andreas Cadhalpun
  • Date: 2015-10-15 00:26:09 UTC
  • mfrom: (0.1.30)
  • Revision ID: package-import@ubuntu.com-20151015002609-ojtldgbtcfmhnewu
Tags: 7:2.8.1-1
[ Balint Reczey ]
* Add myself to uploaders.

[ Andreas Cadhalpun ]
* Import new upstream bugfix release 2.8.1.
* Remove hls-only-seek-if-there-is-an-offset.patch included upstream.
* Add avcodec-vp8-Do-not-use-num_coeff_partitions-in-thread.patch to
  fix CVE-2015-6761.
* Enable x264 on mips64el and opencv on alpha.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From be70574c03f97c83e5701118d68a07e91b81c3d6 Mon Sep 17 00:00:00 2001
2
 
From: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
3
 
Date: Tue, 22 Sep 2015 13:40:20 +0200
4
 
Subject: [PATCH] hls: only seek if there is an offset
5
 
 
6
 
If there is no #EXT-X-BYTERANGE specified, there is no need to seek.
7
 
Seeking fails anyway for rtmp, because this protocol does not support
8
 
url_seek.
9
 
 
10
 
This fixes CNN.m3u from trac ticket 4797 (i.e. Debian bug #798189).
11
 
---
12
 
 libavformat/hls.c | 2 +-
13
 
 1 file changed, 1 insertion(+), 1 deletion(-)
14
 
 
15
 
diff --git a/libavformat/hls.c b/libavformat/hls.c
16
 
index c16c770..896d36e 100644
17
 
--- a/libavformat/hls.c
18
 
+++ b/libavformat/hls.c
19
 
@@ -1047,7 +1047,7 @@ static int open_input(HLSContext *c, struct playlist *pls)
20
 
     /* Seek to the requested position. If this was a HTTP request, the offset
21
 
      * should already be where want it to, but this allows e.g. local testing
22
 
      * without a HTTP server. */
23
 
-    if (ret == 0 && seg->key_type == KEY_NONE) {
24
 
+    if (ret == 0 && seg->key_type == KEY_NONE && seg->url_offset) {
25
 
         int seekret = ffurl_seek(pls->input, seg->url_offset, SEEK_SET);
26
 
         if (seekret < 0) {
27
 
             av_log(pls->parent, AV_LOG_ERROR, "Unable to seek to offset %"PRId64" of HLS segment '%s'\n", seg->url_offset, seg->url);
28
 
2.5.1
29