Skip to content

Commit

Permalink
Work around bug #67, poppler bug #96884
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipberndt committed Oct 18, 2016
1 parent afcbb7a commit 6f2420a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions README.markdown
Expand Up @@ -134,6 +134,7 @@ Changelog

pqiv 2.7 (wip)
* Fixed window decoration toggling with --transparent-background
* Work around bug #67, poppler bug #96884

pqiv 2.6
* Added --enforce-window-aspect-ratio
Expand Down
10 changes: 5 additions & 5 deletions backends/poppler.c
Expand Up @@ -35,10 +35,10 @@ BOSNode *file_type_poppler_alloc(load_images_state_t state, file_t *file) {/*{{{
// We have to load the file now to get the number of pages
GError *error_pointer = NULL;

#if POPPLER_CHECK_VERSION(0, 26, 5)
// The stream loading problem (bug #82630 upstream) was fixed upstream in
#if 0 && POPPLER_CHECK_VERSION(0, 26, 5)
// Poppler has a bug in its stream loader. The original problem #82630 was fixed in
// http://cgit.freedesktop.org/poppler/poppler/commit/?h=poppler-0.26&id=f94ba85a736b4c90c05e7782939f32506472658e
// and the fix will appear in 0.26.5
// and the fix appeared in 0.26.5. But there is another bug, see #96884.
//
GInputStream *data = image_loader_stream_file(file, NULL);
if(!data) {
Expand Down Expand Up @@ -86,7 +86,7 @@ BOSNode *file_type_poppler_alloc(load_images_state_t state, file_t *file) {/*{{{
g_clear_error(&error_pointer);
}

#if POPPLER_CHECK_VERSION(0, 26, 5)
#if 0 && POPPLER_CHECK_VERSION(0, 26, 5)
g_object_unref(data);
#else
buffered_file_unref(file);
Expand All @@ -102,7 +102,7 @@ void file_type_poppler_load(file_t *file, GInputStream *data, GError **error_poi
file_private_data_poppler_t *private = file->private;

// We need to load the data into memory, because poppler has problems with serving from streams; see above
#if POPPLER_CHECK_VERSION(0, 26, 5)
#if 0 && POPPLER_CHECK_VERSION(0, 26, 5)
PopplerDocument *document = poppler_document_new_from_stream(data, -1, NULL, image_loader_cancellable, error_pointer);
#else
GBytes *data_bytes = buffered_file_as_bytes(file, data, error_pointer);
Expand Down

0 comments on commit 6f2420a

Please sign in to comment.