[haiku-commits] haiku: hrev45126 - src/add-ons/media/plugins/ffmpeg

  • From: stefano.ceccherini@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 4 Jan 2013 00:08:23 +0100 (CET)

hrev45126 adds 2 changesets to branch 'master'
old head: d6b2fbac191c0531f6dfc8bd68c71d326d985317
new head: 7845676a3efb8efb83195f99d46a24aec288dfa1
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=7845676+%5Ed6b2fba

----------------------------------------------------------------------------

7e75e56: Use av_alloc_put_byte() instead of ffio_init_context() since the
  latter expects an already allocated AVIOContext.
  BeScreenCapture works again, and should fix also #8299.

7845676: Merge branch 'master' of ssh://git.haiku-os.org/haiku

                       [ Stefano Ceccherini <stefano.ceccherini@xxxxxxxxx> ]

----------------------------------------------------------------------------

1 file changed, 6 insertions(+), 5 deletions(-)
src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp | 11 ++++++-----

############################################################################

Commit:      7e75e564f8bc5090428814ca44f7885c6ed8c79d
URL:         http://cgit.haiku-os.org/haiku/commit/?id=7e75e56
Author:      Stefano Ceccherini <stefano.ceccherini@xxxxxxxxx>
Date:        Thu Jan  3 20:49:30 2013 UTC

Ticket:      https://dev.haiku-os.org/ticket/8299

Use av_alloc_put_byte() instead of ffio_init_context() since the
latter expects an already allocated AVIOContext.
BeScreenCapture works again, and should fix also #8299.

----------------------------------------------------------------------------

diff --git a/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp 
b/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp
index 1e2bcfe..e12a958 100644
--- a/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp
+++ b/src/add-ons/media/plugins/ffmpeg/AVFormatWriter.cpp
@@ -363,11 +363,12 @@ AVFormatWriter::Init(const media_file_format* fileFormat)
        if (buffer == NULL)
                return B_NO_MEMORY;
 
-       // Init I/O context with buffer and hook functions, pass ourself as
-       // cookie.
-       if (init_put_byte(fIOContext, buffer, kIOBufferSize, 1, this,
-                       0, _Write, _Seek) != 0) {
-               TRACE("  init_put_byte() failed!\n");
+       // Allocate I/O context and initialize it with buffer
+       // and hook functions, pass ourself as cookie.
+       fIOContext = av_alloc_put_byte(buffer, kIOBufferSize, 1, this,
+                       0, _Write, _Seek);
+       if (fIOContext == NULL) {
+               TRACE("av_alloc_put_byte() failed!\n");
                return B_ERROR;
        }
 

############################################################################

Revision:    hrev45126
Commit:      7845676a3efb8efb83195f99d46a24aec288dfa1
URL:         http://cgit.haiku-os.org/haiku/commit/?id=7845676
Author:      Stefano Ceccherini <stefano.ceccherini@xxxxxxxxx>
Date:        Thu Jan  3 23:07:38 2013 UTC

Merge branch 'master' of ssh://git.haiku-os.org/haiku

----------------------------------------------------------------------------


Other related posts:

  • » [haiku-commits] haiku: hrev45126 - src/add-ons/media/plugins/ffmpeg - stefano . ceccherini